Class StringUtils
Inheritance
System.Object
StringUtils
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Bayat.Json.Runtime.dll
Syntax
public static class StringUtils
Fields
|
Improve this Doc
View Source
CarriageReturn
Declaration
public const char CarriageReturn = '\r'
Field Value
Type |
Description |
System.Char |
|
|
Improve this Doc
View Source
CarriageReturnLineFeed
Declaration
public const string CarriageReturnLineFeed = "\r\n"
Field Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Empty
Declaration
public const string Empty = ""
Field Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
LineFeed
Declaration
public const char LineFeed = '\n'
Field Value
Type |
Description |
System.Char |
|
|
Improve this Doc
View Source
Tab
Declaration
public const char Tab = '\t'
Field Value
Type |
Description |
System.Char |
|
Methods
|
Improve this Doc
View Source
CreateStringWriter(Int32)
Declaration
public static StringWriter CreateStringWriter(int capacity)
Parameters
Type |
Name |
Description |
System.Int32 |
capacity |
|
Returns
Type |
Description |
System.IO.StringWriter |
|
|
Improve this Doc
View Source
EndsWith(String, Char)
Declaration
public static bool EndsWith(this string source, char value)
Parameters
Type |
Name |
Description |
System.String |
source |
|
System.Char |
value |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ForgivingCaseSensitiveFind<TSource>(IEnumerable<TSource>, Func<TSource, String>, String)
Declaration
public static TSource ForgivingCaseSensitiveFind<TSource>(this IEnumerable<TSource> source, Func<TSource, string> valueSelector, string testValue)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<TSource> |
source |
|
System.Func<TSource, System.String> |
valueSelector |
|
System.String |
testValue |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Declaration
public static string FormatWith(this string format, IFormatProvider provider, object arg0)
Parameters
Type |
Name |
Description |
System.String |
format |
|
System.IFormatProvider |
provider |
|
System.Object |
arg0 |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Declaration
public static string FormatWith(this string format, IFormatProvider provider, object arg0, object arg1)
Parameters
Type |
Name |
Description |
System.String |
format |
|
System.IFormatProvider |
provider |
|
System.Object |
arg0 |
|
System.Object |
arg1 |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Declaration
public static string FormatWith(this string format, IFormatProvider provider, object arg0, object arg1, object arg2)
Parameters
Type |
Name |
Description |
System.String |
format |
|
System.IFormatProvider |
provider |
|
System.Object |
arg0 |
|
System.Object |
arg1 |
|
System.Object |
arg2 |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Declaration
public static string FormatWith(this string format, IFormatProvider provider, object arg0, object arg1, object arg2, object arg3)
Parameters
Type |
Name |
Description |
System.String |
format |
|
System.IFormatProvider |
provider |
|
System.Object |
arg0 |
|
System.Object |
arg1 |
|
System.Object |
arg2 |
|
System.Object |
arg3 |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
GetLength(String)
Declaration
public static int? GetLength(string value)
Parameters
Type |
Name |
Description |
System.String |
value |
|
Returns
Type |
Description |
System.Nullable<System.Int32> |
|
|
Improve this Doc
View Source
IsHighSurrogate(Char)
Declaration
public static bool IsHighSurrogate(char c)
Parameters
Type |
Name |
Description |
System.Char |
c |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsLowSurrogate(Char)
Declaration
public static bool IsLowSurrogate(char c)
Parameters
Type |
Name |
Description |
System.Char |
c |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsWhiteSpace(String)
Determines whether the string is all white space. Empty string will return false.
Declaration
public static bool IsWhiteSpace(string s)
Parameters
Type |
Name |
Description |
System.String |
s |
The string to test whether it is all white space.
|
Returns
Type |
Description |
System.Boolean |
true if the string is all white space; otherwise, false .
|
|
Improve this Doc
View Source
NullEmptyString(String)
Declaration
public static string NullEmptyString(string s)
Parameters
Type |
Name |
Description |
System.String |
s |
The string.
|
Returns
Type |
Description |
System.String |
Null if the string was null, otherwise the string unchanged.
|
|
Improve this Doc
View Source
StartsWith(String, Char)
Declaration
public static bool StartsWith(this string source, char value)
Parameters
Type |
Name |
Description |
System.String |
source |
|
System.Char |
value |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ToCamelCase(String)
Declaration
public static string ToCamelCase(string s)
Parameters
Type |
Name |
Description |
System.String |
s |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ToCharAsUnicode(Char, Char[])
Declaration
public static void ToCharAsUnicode(char c, char[] buffer)
Parameters
Type |
Name |
Description |
System.Char |
c |
|
System.Char[] |
buffer |
|