Skip to content
lainz edited this page Jul 22, 2016 · 5 revisions

String.Asc

Returns the Unicode code of a character (in decimal format).

code = String.Asc("ñ")
  • In this case will return 241.

String.Char

Returns the character value of a specific Unicode code (in decimal format).

character = String.Char(241)
  • In this case will return "ñ".

String.Compare

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.

String.CompareFileVersions

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.

String.CompareNoCase

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.

String.Concat

Joins two strings together and return as new string.

result_string = String.Concat("One","Two")
  • In this case will return "OneTwo".

String.Find

Finds a sub-string.

Parameters: SearchString, Pattern, StartAt, CaseSensitive

result_number = String.Find("Lorem Ipsum", "sum", 1, false)

String.GetFormattedSize

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

String.Left

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".

String.Length

Get the number of characters in a string.

result_number = String.Length("Cañón")
  • The result in this case will be 5.

String.Lower

Returns a lowercase string.

result_string = String.Lower("Cañón")
  • The result in this case will be "cañón".

String.Mid

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".

String.Repeat

Repeat a string a giver number of times.

result_string = String.Repeat("10", 2)
  • The result in this case will be "1010".

String.Replace

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".

String.ReverseFind

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.

String.Right

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".

String.ToNumber

Converts the numeric string into number.

result_number = String.ToNumber("100.5")

String.Upper

Returns a uppercase string.

result_string = String.Upper("Cañón")
  • The result in this case will be "CAÑÓN".