33 references to TrimType
System.Private.CoreLib (33)
src\runtime\src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (24)
2685
return TrimWhiteSpaceHelper(
TrimType
.Both);
2695
return TrimHelper(&trimChar, 1,
TrimType
.Both);
2737
return TrimWhiteSpaceHelper(
TrimType
.Both);
2741
return TrimHelper(pTrimChars, trimChars.Length,
TrimType
.Both);
2758
return TrimWhiteSpaceHelper(
TrimType
.Both);
2763
return TrimHelper(pTrimChars, trimChars.Length,
TrimType
.Both);
2768
public string TrimStart() => TrimWhiteSpaceHelper(
TrimType
.Head);
2771
public unsafe string TrimStart(char trimChar) => TrimHelper(&trimChar, 1,
TrimType
.Head);
2804
return TrimWhiteSpaceHelper(
TrimType
.Head);
2808
return TrimHelper(pTrimChars, trimChars.Length,
TrimType
.Head);
2825
return TrimWhiteSpaceHelper(
TrimType
.Head);
2830
return TrimHelper(pTrimChars, trimChars.Length,
TrimType
.Head);
2835
public string TrimEnd() => TrimWhiteSpaceHelper(
TrimType
.Tail);
2838
public unsafe string TrimEnd(char trimChar) => TrimHelper(&trimChar, 1,
TrimType
.Tail);
2871
return TrimWhiteSpaceHelper(
TrimType
.Tail);
2875
return TrimHelper(pTrimChars, trimChars.Length,
TrimType
.Tail);
2892
return TrimWhiteSpaceHelper(
TrimType
.Tail);
2897
return TrimHelper(pTrimChars, trimChars.Length,
TrimType
.Tail);
2901
private string TrimWhiteSpaceHelper(
TrimType
trimType)
2909
if ((trimType &
TrimType
.Head) != 0)
2920
if ((trimType &
TrimType
.Tail) != 0)
2934
private unsafe string TrimHelper(char* trimChars, int trimCharsLength,
TrimType
trimType)
2945
if ((trimType &
TrimType
.Head) != 0)
2966
if ((trimType &
TrimType
.Tail) != 0)
src\runtime\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)