StringExtensions Class
.NET Standard 2.x
Provides the extension methods for String.
Namespace: PowerScript.Bridge
Assembly: PowerScript.Bridge.dll
Syntax
public static class StringExtensions;
Methods
| Name | Return Type | Description |
|---|---|---|
| Asc(this string str) | System.Int16 | Converts the first character of a string to its Unicode code point. A code point is the numerical short value given to a Unicode character. |
| AscA(this string str) | System.Int16 | Converts the first character of a string to its ASCII short value. |
| Byte(this string str) | System.Byte | Converts a string to a Byte datatype. |
| Char(this string str) | System.Char | Extracts the first Unicode character of a string to a char. |
| CharA(this string str) | System.Char | Extracts the first ASCII character of a string to a char. |
| Date(this string str) | System.DateTime | Converts a string whose value is a valid date to a DateTime value. |
| DateTime(this string str) | System.DateTime | Extracts a DateTime value from a string whose value is valid datetime. |
| Dec(this string str) | System.Decimal | Converts a string to a decimal number. |
| Double(this string str) | System.Double | Converts a string to a double. |
| Fill(this string chars, int? n) | System.String | Builds a string of the specified length by repeating the specified characters until the result string is long enough. |
| FillA(this string chars, int? n) | System.String | Builds a string of the specified length in bytes by repeating the specified characters until the result string is long enough. |
| Integer(this string str) | System.Int16 | Converts the value of a string to an integer. |
| IsAllArabic(this string value) | System.Boolean | Tests whether a particular string is composed entirely of Arabic characters. |
| IsAllHebrew(this string value) | System.Boolean | Tests whether a particular string is composed entirely of Hebrew characters. |
| IsAnyArabic(this string value) | System.Boolean | Tests whether a particular string contains at least one Arabic character. |
| IsAnyHebrew(this string value) | System.Boolean | Tests whether a particular string contains at least one Hebrew character. |
| IsArabic(this string value) | System.Boolean | Tests whether a particular character is an Arabic character. For a string, IsArabic tests only the first character on the left. |
| IsArabicAndNumbers(this string value) | System.Boolean | Tests whether a particular string is composed entirely of Arabic characters or numbers. |
| IsDate(this string str) | System.Boolean | Tests whether a string value is a valid DateTime. |
| IsHebrew(this string value) | System.Boolean | Tests whether a particular character is a Hebrew character. For a string, IsHebrew tests only the first character on the left. |
| IsHebrewAndNumbers(this string value) | System.Boolean | Tests whether a particular string is composed entirely of Hebrew characters and numbers. |
| IsNumber(this string str) | System.Boolean | Reports whether the value of a string is a number. |
| IsTime(this string v) | System.Boolean | Reports whether the value of a string is a valid TimeSpan value. |
| LastPos(this string strA, string strB) | System.Int32 | Finds the last position of a target string in a source string. |
| LastPos(this string strA, string strB, int? searchlength) | System.Int32 | Finds the last position of a target string in a source string. |
| Left(this string value, int? n) | System.String | Obtains a specified number of characters from the beginning of a string. |
| LeftA(this string value, int? n) | System.String | Temporarily converts a string from Unicode to DBCS based on the current locale, then returns the specified number of bytes from the string. |
| LenA(this string str) | System.Int32 | Temporarily converts the string from Unicode to DBCS based on the current locale, then obtains a string length in bytes. |
| Long(this string str) | System.Int32 | Converts a string whose value is a number into an int. |
| LongLong(this string str) | System.Int64 | Converts a string whose value is a number into a long. |
| Match(this string input, string pattern) | System.Boolean | Determines whether a string's value contains a particular pattern of characters. |
| Mid(this string source, int? startIndex) | System.String | Obtains characters from a specified position in a string. |
| Mid(this string source, int? startIndex, int? length) | System.String | Obtains a specified number of characters from a specified position in a string. |
| MidA(this string source, int? startIndex) | System.String | Temporarily converts a string to DBCS, then returns bytes from the string, starting from a specified position. |
| MidA(this string source, int? startIndex, int? length) | System.String | Temporarily converts a string to DBCS, then returns the specified number of bytes from the string, starting from a specified position. |
| Pos(this string strA, string strB) | System.Int32 | Finds one string within another string. |
| Pos(this string strA, string strB, int? startIndex) | System.Int32 | Finds one string within another string. |
| PosA(this string strA, string strB) | System.Int32 | Temporarily converts a string from Unicode to DBCS based on the current locale, then finds one string within another string. |
| PosA(this string strA, string strB, int? startIndex) | System.Int32 | Temporarily converts a string from Unicode to DBCS based on the current locale, then finds one string within another string. |
| Real(this string str) | System.Single | Converts a string value to a real datatype. |
| Replace(this string strA, int? startIndex, int? count, string strB) | System.String | Replaces a portion of one string with another. |
| ReplaceA(this string strA, int? startIndex, int? count, string strB) | System.String | Temporarily converts a string to DBCS based on the current locale, then replaces a portion of one string with another. |
| Reverse(this string str) | System.String | Reverses the order of characters in a string. |
| Right(this string value, int? length) | System.String | Obtains a specified number of characters from the end of a string. |
| RightA(this string value, int? length) | System.String | Temporarily converts a string from Unicode to DBCS based on the current locale, then returns the specified number of bytes from the end of the string. |
| Time(this string str) | System.TimeSpan | Converts a string containing a valid time into a time value. |
| WordCap(this string str) | System.String | Capitalizes the first letter of each word in a passed script. It sets the remaining letters in each word to lowercase. |