-
Notifications
You must be signed in to change notification settings - Fork 8
String
Returns the Unicode code of a character (in decimal format).
code = String.Asc("ñ")
- In this case will return 241.
Returns the character value of a specific Unicode code (in decimal format).
character = String.Char(241)
- In this case will return "ñ".
Case-sensitive comparison between two strings.
isbigger = String.Compare("Cañón","El Gran")
- -1: The first string is smaller.
- 0: Both strings are equal.
- 1: The first string is bigger.
Compares two file version strings.
isbigger = String.CompareFileVersions("1.0.0.0","2.0.0.0")
- -1: The first version is smaller.
- 0: Both versions are equal.
- 1: The first version is bigger.
Case-insensitive comparison between tho strings.
isbigger = String.CompareNoCase("CAÑÓN","cañón")
- -1: The first string is smaller.
- 0: Both strings are equal.
- 1: The first string is bigger.
Joins two strings together and return as new string.
result_string = String.Concat("One","Two")
- In this case will return "OneTwo".
Finds a sub-string.
Parameters: SearchString, Pattern, StartAt, CaseSensitive
result_number = String.Find("Lorem Ipsum", "sum", 1, false)
Formats a number of bytes and converts it to bytes, KB, MB, GB or TB.
Parameters: SizeInBytes, Format
result_string = String.GetFormattedSize(2048, 1)
Format:
- 1: Automatic
- 2: to bytes
- 3: to KB
- 4: to MB
- 5: to GB
- 6: to TB
Copy left n characters into a new string.
Parameters: String, NumberOfChars
result_string = String.Left("Hello World", 4)
- The result in this case will be "Hello".
Get the number of characters in a string.
result_number = String.Length("Cañón")
- The result in this case will be 5.
Returns a lowercase string.
result_string = String.Lower("Cañón")
- The result in this case will be "cañón".
Returns a range of characters from a string.
Parameters: String, Start, NumberOfChars
result_string = String.Mid("El Gran Cañón", 4, 4)
- The result in this case will be "Gran".
Repeat a string a giver number of times.
result_string = String.Repeat("10", 2)
- The result in this case will be "1010".
Replaces a pattern with a new one.
Parameters: String, Pattern, ReplaceWith, CaseSensitive
result_string = String.Replace("El Gran Cañón", "Gran", "Pequeño", true)
- The result in this case will be "El Pequeño Cañón".
Finds a sub-string from right to left.
Parameters: String, Pattern, CaseSensitive
result_number = String.ReverseFind("Repeat Repeat", "Repeat", true)
- The result in this case will be 8.
Copy right n characters into a new string.
Parameters: String, NumberOfChars
result_string = String.Right("Hello World", 5)
- The result in this case will be "World".
Converts the numeric string into number.
result_number = String.ToNumber("100.5")
Returns a uppercase string.
result_string = String.Upper("Cañón")
- The result in this case will be "CAÑÓN".