33 references to TrimType
System.Private.CoreLib (33)
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (24)
2391
return TrimWhiteSpaceHelper(
TrimType
.Both);
2401
return TrimHelper(&trimChar, 1,
TrimType
.Both);
2454
return TrimWhiteSpaceHelper(
TrimType
.Both);
2458
return TrimHelper(pTrimChars, trimChars.Length,
TrimType
.Both);
2475
return TrimWhiteSpaceHelper(
TrimType
.Both);
2480
return TrimHelper(pTrimChars, trimChars.Length,
TrimType
.Both);
2485
public string TrimStart() => TrimWhiteSpaceHelper(
TrimType
.Head);
2488
public unsafe string TrimStart(char trimChar) => TrimHelper(&trimChar, 1,
TrimType
.Head);
2528
return TrimWhiteSpaceHelper(
TrimType
.Head);
2532
return TrimHelper(pTrimChars, trimChars.Length,
TrimType
.Head);
2549
return TrimWhiteSpaceHelper(
TrimType
.Head);
2554
return TrimHelper(pTrimChars, trimChars.Length,
TrimType
.Head);
2559
public string TrimEnd() => TrimWhiteSpaceHelper(
TrimType
.Tail);
2562
public unsafe string TrimEnd(char trimChar) => TrimHelper(&trimChar, 1,
TrimType
.Tail);
2602
return TrimWhiteSpaceHelper(
TrimType
.Tail);
2606
return TrimHelper(pTrimChars, trimChars.Length,
TrimType
.Tail);
2623
return TrimWhiteSpaceHelper(
TrimType
.Tail);
2628
return TrimHelper(pTrimChars, trimChars.Length,
TrimType
.Tail);
2632
private string TrimWhiteSpaceHelper(
TrimType
trimType)
2640
if ((trimType &
TrimType
.Head) != 0)
2651
if ((trimType &
TrimType
.Tail) != 0)
2665
private unsafe string TrimHelper(char* trimChars, int trimCharsLength,
TrimType
trimType)
2676
if ((trimType &
TrimType
.Head) != 0)
2697
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)