33 references to TrimType
System.Private.CoreLib (33)
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (24)
2334
return TrimWhiteSpaceHelper(
TrimType
.Both);
2344
return TrimHelper(&trimChar, 1,
TrimType
.Both);
2352
return TrimWhiteSpaceHelper(
TrimType
.Both);
2356
return TrimHelper(pTrimChars, trimChars.Length,
TrimType
.Both);
2373
return TrimWhiteSpaceHelper(
TrimType
.Both);
2378
return TrimHelper(pTrimChars, trimChars.Length,
TrimType
.Both);
2383
public string TrimStart() => TrimWhiteSpaceHelper(
TrimType
.Head);
2386
public unsafe string TrimStart(char trimChar) => TrimHelper(&trimChar, 1,
TrimType
.Head);
2393
return TrimWhiteSpaceHelper(
TrimType
.Head);
2397
return TrimHelper(pTrimChars, trimChars.Length,
TrimType
.Head);
2414
return TrimWhiteSpaceHelper(
TrimType
.Head);
2419
return TrimHelper(pTrimChars, trimChars.Length,
TrimType
.Head);
2424
public string TrimEnd() => TrimWhiteSpaceHelper(
TrimType
.Tail);
2427
public unsafe string TrimEnd(char trimChar) => TrimHelper(&trimChar, 1,
TrimType
.Tail);
2434
return TrimWhiteSpaceHelper(
TrimType
.Tail);
2438
return TrimHelper(pTrimChars, trimChars.Length,
TrimType
.Tail);
2455
return TrimWhiteSpaceHelper(
TrimType
.Tail);
2460
return TrimHelper(pTrimChars, trimChars.Length,
TrimType
.Tail);
2464
private string TrimWhiteSpaceHelper(
TrimType
trimType)
2472
if ((trimType &
TrimType
.Head) != 0)
2483
if ((trimType &
TrimType
.Tail) != 0)
2497
private unsafe string TrimHelper(char* trimChars, int trimCharsLength,
TrimType
trimType)
2508
if ((trimType &
TrimType
.Head) != 0)
2529
if ((trimType &
TrimType
.Tail) != 0)
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Trimming.cs (9)
15
public static Range Trim(ReadOnlySpan<byte> value) => TrimHelper(value,
TrimType
.Both);
18
public static Range Trim(ReadOnlySpan<char> value) => TrimHelper(value,
TrimType
.Both);
25
public static Range TrimStart(ReadOnlySpan<byte> value) => TrimHelper(value,
TrimType
.Head);
28
public static Range TrimStart(ReadOnlySpan<char> value) => TrimHelper(value,
TrimType
.Head);
35
public static Range TrimEnd(ReadOnlySpan<byte> value) => TrimHelper(value,
TrimType
.Tail);
38
public static Range TrimEnd(ReadOnlySpan<char> value) => TrimHelper(value,
TrimType
.Tail);
40
private static Range TrimHelper<T>(ReadOnlySpan<T> value,
TrimType
trimType)
55
if ((trimType &
TrimType
.Head) != 0)
68
if ((trimType &
TrimType
.Tail) != 0)