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

◆ TrimHelper()

unsafe string System.String.TrimHelper ( char * trimChars,
int trimCharsLength,
TrimType trimType )
inlineprivate

Definition at line 3153 of file String.cs.

3154 {
3155 int num = Length - 1;
3156 int i = 0;
3157 if ((trimType & TrimType.Head) != 0)
3158 {
3159 for (i = 0; i < Length; i++)
3160 {
3161 int num2 = 0;
3162 char c = this[i];
3163 for (num2 = 0; num2 < trimCharsLength && trimChars[num2] != c; num2++)
3164 {
3165 }
3166 if (num2 == trimCharsLength)
3167 {
3168 break;
3169 }
3170 }
3171 }
3172 if ((trimType & TrimType.Tail) != 0)
3173 {
3174 for (num = Length - 1; num >= i; num--)
3175 {
3176 int num3 = 0;
3177 char c2 = this[num];
3178 for (num3 = 0; num3 < trimCharsLength && trimChars[num3] != c2; num3++)
3179 {
3180 }
3181 if (num3 == trimCharsLength)
3182 {
3183 break;
3184 }
3185 }
3186 }
3187 return CreateTrimmedString(i, num);
3188 }
string CreateTrimmedString(int start, int end)
Definition String.cs:3190

References System.String.CreateTrimmedString(), and System.String.Length.

Referenced by System.String.Trim(), System.String.Trim(), System.String.TrimEnd(), System.String.TrimEnd(), System.String.TrimStart(), and System.String.TrimStart().