ELString Class
The ELString class is an system class that represents a string of characters along with properties and methods for manipulating the string.
Namespace: elsystem
Properties
Name | Type | Description | |
Chars[index] | int | Returns the character at the specified index in the current instance. | |
Length | int | Gets the number of characters in the current instance. |
Methods
The following methods are common to the above ValueType classes, although not all methods are used by every class. The 'value' parameter refers to a value of the current instance type. For information about specific methods for a specific ValueType class, refer to the Dictionary and the description for that method.
Name | Description | |
Compare(strA,strB) | Compares two strings and returns an integer that indicates their relative position based on alphabetic sorting rules. See ** below. | |
Compare(strA,strB,ignoreCase) | Compares two strings, ignoring or honoring their case, and returns an integer that indicates their relative position based on alphabetic sorting rules. See ** below. | |
Compare(strA,strB, comparisonType) |
Compares two strings using the specified rules, and returns an integer that indicates their relative position based on alphabetic sorting rules honoring cultural rules. The rules are specified using an enum value from StringComparison. See ** below. | |
CompareOrdinal(strA,strB) | Compares two strings and returns an integer that indicates their relative position based on case-sensitive ordinal sort rules. | |
CompareTo(strB) | Compares this instance with a specified string and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified string. See ** below | |
** Returns 0 when strA=strB, +1, when strA>strB, and -1 when strA<B. | ||
Concat(values) | Concatenates the string representations of list of values. Ex. newString = Concat("Combines this"," and this", "with this"); results in: 'Combines this and this with this'. |
|
Contains(value) | True when the specified value substring occurs within the string instance. | |
EndsWith(value) | True when the end of the current string instance matches the specified value string. | |
EndsWith(value,comparisonType) | True when the end of the current string instance matches the specified value string when compared using the specified type from StringComparison. | |
Equals(sTarget) | True if the current string instance is equal to the specified sTarget value. | |
Equals(obj) | True if the current string instance is equal to the specified object. | |
Format(format,args) | Returns a string where each indexed placeholder in a format string is replaced with the string representation of a corresponding object in the args array. See Composite Formatting for more information. Ex: newString = elsystem.elstring.Format("The {0} bar has a price of {1}",Date,Close); results in a string similar to, "The 1140305 bar has a price of 23.15" |
|
IndexOf(value) | Reports the zero-based index of the first occurrence of the specified value string in the current string object. | |
IndexOf(value,startIndex) | Reports the zero-based index of the first occurrence of the specified value string in the current string object. The search starts at a specified startIndex character position. | |
IndexOf(value,startIndex,count, comparisonType) |
Reports the zero-based index of the first occurrence of the specified value string in the current string object. Parameters specify the starting search position startIndexin the current string, the number of characters in the current string to search, and using the specified type from StringComparison. | |
Insert(startIndex,value) | Returns a new string in which the specified value string is inserted at a specified startIndex position in this instance. | |
Join(separator,values) | Concatenates all the specified elements of the values string array using the specified separator between each element. | |
Join(separator,value,startIndex, count) |
Concatenates the specified elements of the value string array (beginning at startIndex for count characters) using the specified separator between each element | |
LastIndex(value) | Reports the zero-based index position of the last occurrence of a specified value string within this instance. | |
LastIndexOf(value,startIndex) | Reports the zero-based index position of the last occurrence of a specified value string within this instance. The search starts at a specified character position and proceeds backward toward the beginning of the string | |
LastIndexOf(value,startIndex, count) |
Reports the zero-based index position of the last occurrence of a specified value string within this instance. The search starts at a specified character position and proceeds backward toward the beginning of the string for a specified number of characters. | |
Remove(startIndex) | Returns a new string in which all the characters in the current instance, beginning at a specified position and continuing through the last position, have been deleted. | |
Remove(startIndex,count) | Returns a new string in which a specified number of characters in the current instance beginning at a specified position have been deleted. | |
Replace(oldValue,newValue) | Returns a new string in which all occurrences of the specified oldValue string in the current instance are replaced with the specified newValue string. The comparison of oldValue is case-sensitive. | |
Split(separator) | Returns a string array that contains the substrings in this instance that are delimited by specified separator string. | |
StartsWith(value) | True when the beginning of this string instance matches the specified value string. | |
StartsWith(value,comparisonType) | True when the beginning of this string instance matches the specified value string when compared using the specified type from StringComparison. | |
Substring(startIndex) | Retrieves a substring from the current string. The substring starts at a specified startIndex character position and continues to the end of the string | |
Substring(startIndex,count) | Retrieves a substring from the current string. The substring starts at a specified character startIndex position and has a specified length. | |
ToLower() | Returns a copy of this string converted to lowercase. | |
ToString() | Converts the value of the current instance to a text string. | |
ToUpper() | Returns a copy of this string converted to uppercase. | |
Trim() | Removes all leading and trailing white-space characters from the current string object. |