Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ MakeSeparatorList() [3/3]

void System.String.MakeSeparatorList ( string[] separators,
ref ValueListBuilder< int > sepListBuilder,
ref ValueListBuilder< int > lengthListBuilder )
inlineprivate

Definition at line 2963 of file String.cs.

2964 {
2965 for (int i = 0; i < Length; i++)
2966 {
2967 foreach (string text in separators)
2968 {
2969 if (!IsNullOrEmpty(text))
2970 {
2971 int length = text.Length;
2972 if (this[i] == text[0] && length <= Length - i && (length == 1 || this.AsSpan(i, length).SequenceEqual(text)))
2973 {
2974 sepListBuilder.Append(i);
2975 lengthListBuilder.Append(length);
2976 i += length - 1;
2977 break;
2978 }
2979 }
2980 }
2981 }
2982 }
static bool IsNullOrEmpty([NotNullWhen(false)] string? value)
Definition String.cs:1319

References System.String.IsNullOrEmpty(), System.length, System.String.Length, and System.text.