2024 April Release

Class FSCEXPEXT@1.1001:StringUtilsFunctions Permanent link for this heading

StringUtils Functions.

Class Hierarchy

Object > ComponentObject > StringUtilsFunctions

Actions Permanent link for this heading

Return Type

Signature

string

AppendIfMissing(
  string str,
  string suffix,
  out retval string result,
  optional string[] suffixes,
  optional boolean ignorecase)

string

Center(
  string str,
  integer length,
  optional string pattern,
  out retval string result)

boolean

Contains(
  string str,
  string search,
  out retval boolean result,
  optional boolean ignorecase)

boolean

ContainsAny(
  string str,
  string[] search,
  out retval boolean result,
  optional boolean ignorecase)

integer

CountMatches(
  string str,
  string sequence,
  out retval integer result,
  optional boolean ignorecase)

boolean

EndsWith(
  string str,
  string suffix,
  out retval boolean result,
  optional boolean ignorecase)

boolean

EndsWithAny(
  string str,
  string[] suffix,
  out retval boolean result,
  optional boolean ignorecase)

boolean

Equals(
  string str,
  string test,
  out retval boolean result,
  optional boolean ignorecase)

boolean

EqualsAny(
  string str,
  string[] test,
  out retval boolean result,
  optional boolean ignorecase)

integer

IndexOf(
  string str,
  string search,
  optional integer startindex,
  out optional retval integer result,
  optional boolean ignorecase)

boolean

IsAsciiAlpha(
  string str,
  out retval boolean result)

boolean

IsAsciiAlphaNumeric(
  string str,
  out retval boolean result)

boolean

IsAsciiNumeric(
  string str,
  out retval boolean result)

boolean

IsAsciiWhitespace(
  string str,
  out retval boolean result)

boolean

IsBlank(
  string str,
  out retval boolean result)

boolean

IsEmpty(
  string str,
  out retval boolean result)

string

Join(
  string[] values,
  optional string separator,
  out optional retval string result,
  optional integer startindex,
  optional integer endindex)

integer

LastIndexOf(
  string str,
  string search,
  optional integer startindex,
  out optional retval integer result,
  optional boolean ignorecase)

string

Left(
  string str,
  integer length,
  out retval string result)

string

LeftPad(
  string str,
  integer length,
  optional string pad,
  out optional retval string result)

string

LowerCase(
  string str,
  out retval string result)

string

Mid(
  string str,
  integer index,
  integer length,
  out retval string result)

string

Overlay(
  string str,
  string overlay,
  integer startindex,
  integer endindex,
  out retval string result)

string

PrependIfMissing(
  string str,
  string prefix,
  out retval string result,
  optional string[] prefixes,
  optional boolean ignorecase)

string

Remove(
  string str,
  string remove,
  out retval string result,
  optional boolean ignorecase)

string

RemoveEnd(
  string str,
  string remove,
  out retval string result,
  optional boolean ignorecase)

string

RemoveStart(
  string str,
  string remove,
  out retval string result,
  optional boolean ignorecase)

string

Repeat(
  string str,
  integer repeat,
  out retval string result,
  optional string separator)

string

Replace(
  string str,
  string search,
  string replace,
  out retval string result,
  optional integer maxreplace,
  optional boolean ignorecase)

string

Reverse(
  string str,
  out retval string result,
  optional string separator,
  optional boolean ignorecase)

string

Right(
  string str,
  integer length,
  out retval string result)

string

RightPad(
  string str,
  integer length,
  optional string pad,
  out optional retval string result)

string[]

Split(
  string str,
  optional string separator,
  optional integer max,
  out optional retval string[] result,
  optional boolean preservealltokens,
  optional boolean wholeseparator,
  optional boolean ignorecase)

boolean

StartsWith(
  string str,
  string prefix,
  out retval boolean result,
  optional boolean ignorecase)

boolean

StartsWithAny(
  string str,
  string[] prefix,
  out retval boolean result,
  optional boolean ignorecase)

string

Strip(
  string str,
  optional string stripchars,
  out retval string result)

string

Substring(
  string str,
  integer startindex,
  optional integer endindex,
  out optional retval string result)

string

SubstringAfter(
  string str,
  string separator,
  out retval string result,
  optional boolean ignorecase)

string

SubstringAfterLast(
  string str,
  string separator,
  out retval string result,
  optional boolean ignorecase)

string

SubstringBefore(
  string str,
  string separator,
  out retval string result,
  optional boolean ignorecase)

string

SubstringBeforeLast(
  string str,
  string separator,
  out retval string result,
  optional boolean ignorecase)

string

SubstringBetween(
  string str,
  string openstr,
  string closestr,
  out retval string result,
  optional boolean ignorecase)

string[]

SubstringsBetween(
  string str,
  string openstr,
  string closestr,
  out retval string[] result,
  optional boolean ignorecase)

string

Trim(
  string str,
  out retval string result)

string

UpperCase(
  string str,
  out retval string result)

Actions Permanent link for this heading


FSCEXPEXT@1.1001:AppendIfMissing Permanent link for this heading

Appends the suffix to the end of the string if the string does not already end with any of the suffixes.

A null source string is treated as the empty string ("").
A null or empty suffix string will return the source string.
The comparison is case-sensitive if ignorecase is null or false.
In addition to the suffix, optional multiple suffixes may be specified.
#StringUtils.AppendIfMissing(null, null) = null
#StringUtils.AppendIfMissing(null, "xyz") = "xyz"
#StringUtils.AppendIfMissing("", "xyz") = "xyz"
#StringUtils.AppendIfMissing("abc", null) = "abc"
#StringUtils.AppendIfMissing("abc", "xyz") = "abcxyz"
#StringUtils.AppendIfMissing("abcxyz", "xyz") = "abcxyz"

#StringUtils.AppendIfMissing("abcXYZ", "xyz", suffixes:"mno") = "abcXYZxyz" #StringUtils.AppendIfMissing("abcxyz", "xyz", suffixes:"mno") = "abcxyz" #StringUtils.AppendIfMissing("abcmno", "xyz", suffixes:"mno") = "abcmno" #StringUtils.AppendIfMissing("abcXYZ", "xyz", suffixes:"mno") = "abcXYZxyz" #StringUtils.AppendIfMissing("abcMNO", "xyz", suffixes:"mno") = "abcMNOxyz"

#StringUtils.AppendIfMissing("abcXYZ", "xyz", suffixes:"mno", ignorecase: true) = "abcXYZ"

string FSCEXPEXT@1.1001:AppendIfMissing(
  string str,
  string suffix,
  out retval string result,
  optional string[] suffixes,
  optional boolean ignorecase)

Name

Description

str

the string

suffix

the string to append

result

the new string

suffixes

the list of strings to test, before append

ignorecase

compare case insensitive

FSCEXPEXT@1.1001:Center Permanent link for this heading

Centers a string in a larger string.

Center to length of length.
A null source string is treated as the empty string ("").
If the length is less than the string length, the string is returned.
If no pattern is specified, a single space is used.
An invalid or negative length is treated as zero.
#StringUtils.Center("", 4, " ")     = "    "
#StringUtils.Center("ab", -1, " ")  = "ab"
#StringUtils.Center("ab", 4, " ")   = " ab "
#StringUtils.Center("abcd", 2, " ") = "abcd"
#StringUtils.Center("a", 4, " ")    = " a  "
#StringUtils.Center("a", 4, "yz")   = "yayz"
#StringUtils.Center("abc", 7, null) = "  abc  "
#StringUtils.Center("abc", 7, "")   = "  abc  "

string FSCEXPEXT@1.1001:Center(
  string str,
  integer length,
  optional string pattern,
  out retval string result)

Name

Description

str

the string

length

the length requested

pattern

the pattern to use to extend the string

result

the new string

FSCEXPEXT@1.1001:Contains Permanent link for this heading

Checks if a string contains a search string.

The comparison is case-sensitive if ignorecase is null or false. A null or empty search string is found anywhere.
#StringUtils.Contains("", *)     = false
#StringUtils.Contains(null, *)     = false
#StringUtils.Contains("abc", "")   = true
#StringUtils.Contains("abc", "a")  = true
#StringUtils.Contains("abc", "z")  = false

#StringUtils.Contains("abc", "A", ignorecase: true) = true #StringUtils.Contains("abc", "Z", ignorecase: true) = false

boolean FSCEXPEXT@1.1001:Contains(
  string str,
  string search,
  out retval boolean result,
  optional boolean ignorecase)

Name

Description

str

the string

search

string to find

result

the boolean result

ignorecase

compare case insensitive

FSCEXPEXT@1.1001:ContainsAny Permanent link for this heading

Checks if a string contains any of multiple search strings.

The comparison is case-sensitive if ignorecase is null or false.
#StringUtils.ContainsAny(null, *)              = false
#StringUtils.ContainsAny(*, null)              = false
#StringUtils.ContainsAny("abcd", ["ab"])        = true
#StringUtils.ContainsAny("abcd", ["d", "xxx"]) = true
#StringUtils.ContainsAny("abcd", ["xxx", "a"]) = true

#StringUtils.ContainsAny("abcd", ["AB"], ignorecase: true) = true #StringUtils.ContainsAny("abcd", ["AB", "CD], ignorecase: true) = true #StringUtils.ContainsAny("abcd", ["D", "XXX"], ignorecase: true) = true #StringUtils.ContainsAny("abcd", ["XXX", "A"], ignorecase: true) = true

boolean FSCEXPEXT@1.1001:ContainsAny(
  string str,
  string[] search,
  out retval boolean result,
  optional boolean ignorecase)

Name

Description

str

the string

search

list of strings to find

result

the boolean result

ignorecase

compare case insensitive

FSCEXPEXT@1.1001:CountMatches Permanent link for this heading

Counts how many times a sequence appears.

A null or empty string returns 0.
A null or empty sequence returns 0.
Only non-overlapping matches are counted.
The comparison is case-sensitive if ignorecase is null or false.
#StringUtils.CountMatches(null, *)       = 0
#StringUtils.CountMatches("", *)         = 0
#StringUtils.CountMatches("abba", null)  = 0
#StringUtils.CountMatches("abba", "")    = 0
#StringUtils.CountMatches("abba", "a")   = 2
#StringUtils.CountMatches("abba", "ab")  = 1
#StringUtils.CountMatches("abba", "xxx") = 0
#StringUtils.CountMatches("ababa", "aba") = 1

#StringUtils.CountMatches("ababa", "AB", ignorecase: true) = 2

integer FSCEXPEXT@1.1001:CountMatches(
  string str,
  string sequence,
  out retval integer result,
  optional boolean ignorecase)

Name

Description

str

the string

sequence

the sequence to search for

result

integer

ignorecase

compare case insensitive

FSCEXPEXT@1.1001:EndsWith Permanent link for this heading

Check if a string ends with a specified suffix.

The comparison is case-sensitive if ignorecase is null or false.
#StringUtils.EndsWith(null, null)      = true
#StringUtils.EndsWith(null, "def")     = false
#StringUtils.EndsWith("abcdef", null)  = true
#StringUtils.EndsWith("abcdef", "def") = true
#StringUtils.EndsWith("ABCDEF", "def") = false

#StringUtils.EndsWith("abcdef", "def", ignorecase: true) = true #StringUtils.EndsWith("ABCDEF", "def", ignorecase: true) = true

boolean FSCEXPEXT@1.1001:EndsWith(
  string str,
  string suffix,
  out retval boolean result,
  optional boolean ignorecase)

Name

Description

str

the string

suffix

string to match

result

the boolean result

ignorecase

compare case insensitive

FSCEXPEXT@1.1001:EndsWithAny Permanent link for this heading

Check if a string ends with a specified list of suffix strings.

The comparison is case-sensitive if ignorecase is null or false.
#StringUtils.EndsWithAny(null, null)     = false
#StringUtils.EndsWithAny(null, ["def"])  = false
#StringUtils.EndsWithAny("abcxyz", null) = false
#StringUtils.EndsWithAny("abcxyz", ["xyz"]) = true
#StringUtils.EndsWithAny("abcxyz", ["xyz", "abc"]) = true
#StringUtils.EndsWithAny("abcxyz", ["XYZ", "abc"]) = false
#StringUtils.EndsWithAny("ABCXYZ", ["xyz", "abc"]) = false

#StringUtils.EndsWithAny("abcxyz", ["XYZ", "abc"], ignorecase: true) = true #StringUtils.EndsWithAny("ABCXYZ", ["xyz", "abc"], ignorecase: true) = true

boolean FSCEXPEXT@1.1001:EndsWithAny(
  string str,
  string[] suffix,
  out retval boolean result,
  optional boolean ignorecase)

Name

Description

str

the string

suffix

list of strings to match

result

the boolean result

ignorecase

compare case insensitive

FSCEXPEXT@1.1001:Equals Permanent link for this heading

Compares two strings, returning true if they represent equal strings.

The comparison is case-sensitive if ignorecase is null or false.
#StringUtils.Equals(null, null)   = true
#StringUtils.Equals(null, "")     = true
#StringUtils.Equals("", "")       = true
#StringUtils.Equals(null, "abc")  = false
#StringUtils.Equals("abc", null)  = false
#StringUtils.Equals("abc", "abc") = true
#StringUtils.Equals("abc", "ABC") = false
#StringUtils.Equals("abc", "ABC", ignorecase: true) = true

boolean FSCEXPEXT@1.1001:Equals(
  string str,
  string test,
  out retval boolean result,
  optional boolean ignorecase)

Name

Description

str

the string to compare

test

other string to compare

result

the boolean result

ignorecase

compare case insensitive

FSCEXPEXT@1.1001:EqualsAny Permanent link for this heading

Compares a string to a list of strings, returning true if any string is equal.

The comparison is case-sensitive if ignorecase is null or false.
#StringUtils.EqualsAny(null, null) = false
#StringUtils.EqualsAny(null, ["abc", "def"])  = false
#StringUtils.EqualsAny("abc", [null, "def"])  = false
#StringUtils.EqualsAny("abc", ["abc", "def"]) = true
#StringUtils.EqualsAny("abc", ["ABC", "DEF"]) = false
#StringUtils.EqualsAny("abc", ["ABC", "DEF"], ignorecase: true) = true

boolean FSCEXPEXT@1.1001:EqualsAny(
  string str,
  string[] test,
  out retval boolean result,
  optional boolean ignorecase)

Name

Description

str

the string to compare

test

other strings to compare

result

the boolean result

ignorecase

compare case insensitive

FSCEXPEXT@1.1001:IndexOf Permanent link for this heading

Finds the first index within a string, return #StringUtils.INDEX_NOT_FOUND (-1) if not found.

A null or empty string will return -1.
A null or empty search string is found anywhere.
If startindex is null or negative, 0 is used instead.
The comparison is case-sensitive if ignorecase is null or false.
#StringUtils.IndexOf(null, *)     = -1
#StringUtils.IndexOf(*, null)     = 0
#StringUtils.IndexOf("", "")      = -1
#StringUtils.IndexOf("", "a")     = -1
#StringUtils.IndexOf("a", "")     = 0
#StringUtils.IndexOf("a", "x")    = -1
#StringUtils.IndexOf("aab", "a")  = 0
#StringUtils.IndexOf("aab", "b")  = 2
#StringUtils.IndexOf("aab", "ab") = 1

#StringUtils.IndexOf("aabaabaa", "b", 3) = 5 #StringUtils.IndexOf("aabaabaa", "b", 9) = -1 #StringUtils.IndexOf("aabaabaa", "b", -1) = 2 #StringUtils.IndexOf("abc", "", 2) = 2 #StringUtils.IndexOf("abc", "", 4) = -1

#StringUtils.IndexOf("aabaabaa", "B", ignorecase: true) = 2 #StringUtils.IndexOf("aabaabaa", "B", -1, ignorecase: true) = 2 #StringUtils.IndexOf("aab", "A", ignorecase: true) = 0 #StringUtils.IndexOf("aab", "B", ignorecase: true) = 2 #StringUtils.IndexOf("aab", "AB", ignorecase: true) = 1

integer FSCEXPEXT@1.1001:IndexOf(
  string str,
  string search,
  optional integer startindex,
  out optional retval integer result,
  optional boolean ignorecase)

Name

Description

str

the string

search

string to find

startindex

optional start index

result

integer index or #StringUtils.INDEX_NOT_FOUND (-1) if not found

ignorecase

compare case insensitive

FSCEXPEXT@1.1001:IsAsciiAlpha Permanent link for this heading

Checks if only ASCII letters are contained.

A null or empty string returns false.
#StringUtils.IsAsciiAlpha(null)   = false
#StringUtils.IsAsciiAlpha("")     = false
#StringUtils.IsAsciiAlpha("  ")   = false
#StringUtils.IsAsciiAlpha("abc")  = true
#StringUtils.IsAsciiAlpha("ab c") = false
#StringUtils.IsAsciiAlpha("ab2c") = false
#StringUtils.IsAsciiAlpha("ab-c") = false
#StringUtils.IsAsciiAlpha("ä")    = false

boolean FSCEXPEXT@1.1001:IsAsciiAlpha(
  string str,
  out retval boolean result)

Name

Description

str

the string

result

the boolean result

FSCEXPEXT@1.1001:IsAsciiAlphaNumeric Permanent link for this heading

Checks if only ASCII letters or digits are contained.

A null or empty string returns false.
#StringUtils.IsAsciiAlphaNumeric(null)   = false
#StringUtils.IsAsciiAlphaNumeric("")     = false
#StringUtils.IsAsciiAlphaNumeric("  ")   = false
#StringUtils.IsAsciiAlphaNumeric("abc")  = true
#StringUtils.IsAsciiAlphaNumeric("123")  = true
#StringUtils.IsAsciiAlphaNumeric("ab c") = false
#StringUtils.IsAsciiAlphaNumeric("ab-c") = false
#StringUtils.IsAsciiAlphaNumeric("abc123") = true
#StringUtils.IsAsciiAlphaNumeric("abc१२३") = false

boolean FSCEXPEXT@1.1001:IsAsciiAlphaNumeric(
  string str,
  out retval boolean result)

Name

Description

str

the string

result

the boolean result

FSCEXPEXT@1.1001:IsAsciiNumeric Permanent link for this heading

Checks if only ASCII digits are contained.

A null or empty string returns false.
#StringUtils.IsAsciiNumeric(null)   = false
#StringUtils.IsAsciiNumeric("")     = false
#StringUtils.IsAsciiNumeric("  ")   = false
#StringUtils.IsAsciiNumeric("123")  = true
#StringUtils.IsAsciiNumeric("12 3") = false
#StringUtils.IsAsciiNumeric("ab2c") = false
#StringUtils.IsAsciiNumeric("12-3") = false
#StringUtils.IsAsciiNumeric("12.3") = false
#StringUtils.IsAsciiNumeric("12,3") = false
#StringUtils.IsAsciiNumeric("-123") = false
#StringUtils.IsAsciiNumeric("+123") = false
#StringUtils.IsAsciiNumeric("१२३")  = false

boolean FSCEXPEXT@1.1001:IsAsciiNumeric(
  string str,
  out retval boolean result)

Name

Description

str

the string

result

the boolean result

FSCEXPEXT@1.1001:IsAsciiWhitespace Permanent link for this heading

Checks if only ASCII whitespace is contained.

A null or empty string returns false.
#StringUtils.IsAsciiWhitespace(null)   = false
#StringUtils.IsAsciiWhitespace("")     = false
#StringUtils.IsAsciiWhitespace("  ")   = true
#StringUtils.IsAsciiWhitespace("abc")  = false
#StringUtils.IsAsciiWhitespace("  abc  ")  = false

boolean FSCEXPEXT@1.1001:IsAsciiWhitespace(
  string str,
  out retval boolean result)

Name

Description

str

the string

result

the boolean result

FSCEXPEXT@1.1001:IsBlank Permanent link for this heading

Checks if a string is empty ("") or null or whitespace only.
#StringUtils.IsBlank(null)      = true
#StringUtils.IsBlank("")        = true
#StringUtils.IsBlank(" ")       = true
#StringUtils.IsBlank("abc")     = false
#StringUtils.IsBlank("  abc  ") = false

boolean FSCEXPEXT@1.1001:IsBlank(
  string str,
  out retval boolean result)

Name

Description

str

the string

result

the boolean result

FSCEXPEXT@1.1001:IsEmpty Permanent link for this heading

Checks if a string is empty ("") or null.

Note: An empty string is invalid and is treated as null by definition.
Note: By default, null is converted to the empty string ("").
#StringUtils.IsEmpty(null)      = true
#StringUtils.IsEmpty("")        = true
#StringUtils.IsEmpty(" ")       = false
#StringUtils.IsEmpty("abc")     = false
#StringUtils.IsEmpty("  abc  ") = false

boolean FSCEXPEXT@1.1001:IsEmpty(
  string str,
  out retval boolean result)

Name

Description

str

the string

result

the boolean result

FSCEXPEXT@1.1001:Join Permanent link for this heading

Joins the elements of the provided array into a single string containing the provided list of elements.

No separator is added before or after the list.
Null objects or empty strings within the array are represented by empty strings.
#StringUtils.Join(null, *)        = null
#StringUtils.Join([], *)          = null
#StringUtils.Join(["1", "2", "3"], ';') = "1;2;3"
#StringUtils.Join(["1", "2", "3"])      = "123"
#StringUtils.Join(["1", "2", "3"], startindex: 1) = "23"
#StringUtils.Join(["1", "2", "3"], startindex: 1, endindex: 1) = "2"
#StringUtils.Join(["1", "2", "3"], startindex: 1, endindex: 2) = "23"
#StringUtils.Join(["1", "2", "3"], endindex: 1) = "12"
#StringUtils.Join(["1", "2", "3"], endindex: 10) = "123"

string FSCEXPEXT@1.1001:Join(
  string[] values,
  optional string separator,
  out optional retval string result,
  optional integer startindex,
  optional integer endindex)

Name

Description

values

list of strings to join

separator

the separator to join the parts

result

the new string

startindex

the index of the first element to join

endindex

the index of the last element to join

FSCEXPEXT@1.1001:LastIndexOf Permanent link for this heading

Finds the last index within a string, return #StringUtils.INDEX_NOT_FOUND (-1) if not found.

A null or empty string will return -1.
A null or empty search string is found anywhere.
If startindex is null or negative, search starts at the end.
The comparison is case-sensitive if ignorecase is null or false.
The search starts at the startindex and works backwards; matches starting after the startindex are ignored.
#StringUtils.LastIndexOf(null, *)          = -1
#StringUtils.LastIndexOf("", *)           = -1
#StringUtils.LastIndexOf("aabaabaa", "a")  = 7
#StringUtils.LastIndexOf("aabaabaa", "b")  = 5
#StringUtils.LastIndexOf("aabaabaa", "ab") = 4
#StringUtils.LastIndexOf("aabaabaa", "")   = 8

#StringUtils.LastIndexOf("aabaabaa", "", 2) = 2 #StringUtils.LastIndexOf("aabaabaa", "a", 8) = 7 #StringUtils.LastIndexOf("aabaabaa", "b", 8) = 5 #StringUtils.LastIndexOf("aabaabaa", "ab", 8) = 4 #StringUtils.LastIndexOf("aabaabaa", "b", 9) = 5 #StringUtils.LastIndexOf("aabaabaa", "b", -1) = 5 #StringUtils.LastIndexOf("aabaabaa", "a", 0) = 0 #StringUtils.LastIndexOf("aabaabaa", "b", 0) = -1

#StringUtils.LastIndexOf("aabaabaa", "A", 8, ignorecase: true) = 7 #StringUtils.LastIndexOf("aabaabaa", "B", 8, ignorecase: true) = 5 #StringUtils.LastIndexOf("aabaabaa", "AB", 8, ignorecase: true) = 4 #StringUtils.LastIndexOf("aabaabaa", "B", 9, ignorecase: true) = 5 #StringUtils.LastIndexOf("aabaabaa", "B", -1, ignorecase: true) = 5 #StringUtils.LastIndexOf("aabaabaa", "A", 0, ignorecase: true) = 0 #StringUtils.LastIndexOf("aabaabaa", "B", 0, ignorecase: true) = -1

#StringUtils.LastIndexOf("aabaabaa", "A", ignorecase: true) = 7 #StringUtils.LastIndexOf("aabaabaa", "B", ignorecase: true) = 5 #StringUtils.LastIndexOf("aabaabaa", "AB", ignorecase: true) = 4 #StringUtils.LastIndexOf("aabaabaa", "", ignorecase: true) = 8

integer FSCEXPEXT@1.1001:LastIndexOf(
  string str,
  string search,
  optional integer startindex,
  out optional retval integer result,
  optional boolean ignorecase)

Name

Description

str

the string

search

string to find

startindex

optional start index

result

integer index or #StringUtils.INDEX_NOT_FOUND (-1) if not found

ignorecase

compare case insensitive

FSCEXPEXT@1.1001:Left Permanent link for this heading

Gets the leftmost length characters of a string.

A null or empty input string returns null.
If length characters are not available, the string is returned.
An empty string is returned if length is negative.
#StringUtils.Left(null, *)    = null
#StringUtils.Left(*, -1)      = null
#StringUtils.Left("", *)      = null
#StringUtils.Left("abc", 0)   = null
#StringUtils.Left("abc", 2)   = "ab"
#StringUtils.Left("abc", 4)   = "abc"

string FSCEXPEXT@1.1001:Left(
  string str,
  integer length,
  out retval string result)

Name

Description

str

the string

length

the requested length

result

the substring

FSCEXPEXT@1.1001:LeftPad Permanent link for this heading

Left pad a string.

A null input string is treated as the empty string ("").
The string is padded to the length of length.
If length is null or negative, the string is returned.
If pad is null or empty, a single space (' ') is used.
#StringUtils.LeftPad(null, 3)   = "   "
#StringUtils.LeftPad("", 3)     = "   "
#StringUtils.LeftPad("bat", 3)  = "bat"
#StringUtils.LeftPad("bat", 5)  = "  bat"
#StringUtils.LeftPad("bat", 1)  = "bat"
#StringUtils.LeftPad("bat", -1) = "bat"
#StringUtils.LeftPad(null, 3, "x")   = "xxx"
#StringUtils.LeftPad("", 3, "z")     = "zzz"
#StringUtils.LeftPad("bat", 3, 'z')  = "bat"
#StringUtils.LeftPad("bat", 5, 'z')  = "zzbat"
#StringUtils.LeftPad("bat", 1, 'z')  = "bat"
#StringUtils.LeftPad("bat", -1, 'z') = "bat"
#StringUtils.LeftPad("bat", 3, "yz") = "bat"
#StringUtils.LeftPad("bat", 6, "yz") = "yzybat"
#StringUtils.LeftPad("bat", 8, "yz") = "yzyzybat"
#StringUtils.LeftPad("bat", 1, "yz") = "bat"
#StringUtils.LeftPad("bat", -1, "yz")= "bat"
#StringUtils.LeftPad("bat", 5, null) = "  bat"
#StringUtils.LeftPad("bat", 5, "")   = "  bat"

string FSCEXPEXT@1.1001:LeftPad(
  string str,
  integer length,
  optional string pad,
  out optional retval string result)

Name

Description

str

the string

length

the requested length

pad

the padding to use to extend the string

result

the padded string

FSCEXPEXT@1.1001:LowerCase Permanent link for this heading

Converts a string to lower case.
#StringUtils.LowerCase(null)  = null
#StringUtils.LowerCase("")    = null
#StringUtils.LowerCase("aBc") = "abc"

string FSCEXPEXT@1.1001:LowerCase(
  string str,
  out retval string result)

Name

Description

str

the string

result

the new string in lower case.

FSCEXPEXT@1.1001:Mid Permanent link for this heading

Gets length middle characters of a string.

A null or empty input string returns null.
If length characters are not available, the reminder of the string is returned.
If length is null or negative or exceeds the length of the string, null is returned.
#StringUtils.Mid(null, *, *)    = null
#StringUtils.Mid(*, *, -1)      = null
#StringUtils.Mid("", 0, *)      = null
#StringUtils.Mid("abc", 0, 2)   = "ab"
#StringUtils.Mid("abc", 0, 4)   = "abc"
#StringUtils.Mid("abc", 2, 4)   = "c"
#StringUtils.Mid("abc", 4, 2)   = null
#StringUtils.Mid("abc", -2, 2)  = "ab"

string FSCEXPEXT@1.1001:Mid(
  string str,
  integer index,
  integer length,
  out retval string result)

Name

Description

str

the string

index

the start position

length

the requested length

result

the substring

FSCEXPEXT@1.1001:Overlay Permanent link for this heading

Overlays part of a string with another string.

A null or empty input string input returns null.
A null overlay string is treated as the empty string.
A negative index is treated as zero.
An index greater than the string length is treated as the string length.
The start index is always the smaller of the two indices.
#StringUtils.Overlay(null, *, *, *)            = null
#StringUtils.Overlay("abcdef", null, 2, 4)     = "abef"
#StringUtils.Overlay("abcdef", "", 2, 4)       = "abef"
#StringUtils.Overlay("abcdef", "", 4, 2)       = "abef"
#StringUtils.Overlay("abcdef", "zzzz", 2, 4)   = "abzzzzef"
#StringUtils.Overlay("abcdef", "zzzz", 4, 2)   = "abzzzzef"
#StringUtils.Overlay("abcdef", "zzzz", -1, 4)  = "zzzzef"
#StringUtils.Overlay("abcdef", "zzzz", 2, 8)   = "abzzzz"
#StringUtils.Overlay("abcdef", "zzzz", -2, -3) = "zzzzabcdef"
#StringUtils.Overlay("abcdef", "zzzz", 8, 10)  = "abcdefzzzz"

string FSCEXPEXT@1.1001:Overlay(
  string str,
  string overlay,
  integer startindex,
  integer endindex,
  out retval string result)

Name

Description

str

the string

overlay

the string to insert

startindex

the start position where to insert

endindex

the end position where to insert

result

the new string

FSCEXPEXT@1.1001:PrependIfMissing Permanent link for this heading

Prepends the prefix to the start of the string if the string does not already start with any of the prefixes.

A null source string is treated as the empty string ("").
A null or empty prefix string will return the source string.
The comparison is case-sensitive if ignorecase is null or false.
In addition to the prefix, optional multiple prefixes may be specified.
#StringUtils.PrependIfMissing(null, null) = null
#StringUtils.PrependIfMissing(null, "xyz") = "xyz"
#StringUtils.PrependIfMissing("", "xyz") = "xyz"
#StringUtils.PrependIfMissing("abc", null) = "abc"
#StringUtils.PrependIfMissing("abc", "xyz") = "xyzabc"

#StringUtils.PrependIfMissing("abc", "xyz", prefixes: "mno") = "xyzabc" #StringUtils.PrependIfMissing("xyzabc", "xyz", prefixes: "mno") = "xyzabc" #StringUtils.PrependIfMissing("mnoabc", "xyz", prefixes: "mno") = "mnoabc" #StringUtils.PrependIfMissing("XYZabc", "xyz", prefixes: "mno") = "xyzXYZabc" #StringUtils.PrependIfMissing("MNOabc", "xyz", prefixes: "mno") = "xyzMNOabc"

#StringUtils.PrependIfMissing("MNOabc", "xyz", prefixes:"mno", ignorecase: true) = "MNOabc"

string FSCEXPEXT@1.1001:PrependIfMissing(
  string str,
  string prefix,
  out retval string result,
  optional string[] prefixes,
  optional boolean ignorecase)

Name

Description

str

the string

prefix

the string to prepend

result

the new string

prefixes

the list of strings to test, before prepend

ignorecase

compare case insensitive

FSCEXPEXT@1.1001:Remove Permanent link for this heading

Removes all occurrences of a substring from within the source string.

A null or empty source string will return null.
A null or empty remove string will return the source string.
The comparison is case-sensitive if ignorecase is null or false.
#StringUtils.Remove(null, *)        = null
#StringUtils.Remove("", *)          = null
#StringUtils.Remove(*, null)        =
#StringUtils.Remove(*, "")          =
#StringUtils.Remove("queued", "ue") = "qd"
#StringUtils.Remove("queued", "zz") = "queued"

#StringUtils.Remove("queued", "ue", ignorecase: true) = "qd" #StringUtils.Remove("queued", "zz", ignorecase: true) = "queued" #StringUtils.Remove("quEUed", "UE", ignorecase: true) = "qd" #StringUtils.Remove("queued", "zZ", ignorecase: true) = "queued"

string FSCEXPEXT@1.1001:Remove(
  string str,
  string remove,
  out retval string result,
  optional boolean ignorecase)

Name

Description

str

the string

remove

the string to remove

result

the new string

ignorecase

compare case insensitive

FSCEXPEXT@1.1001:RemoveEnd Permanent link for this heading

Removes a substring only if it is at the end of a source string, otherwise returns the source string.

A null or empty string will return null.
A null or empty remove string will return the source string.
The comparison is case-sensitive if ignorecase is null or false.
#StringUtils.RemoveEnd(null, *)      = null
#StringUtils.RemoveEnd("", *)        = null
#StringUtils.RemoveEnd(*, null)      =
#StringUtils.RemoveEnd(*, "")        =
#StringUtils.RemoveEnd("www.domain.com", ".com.")  = "www.domain.com"
#StringUtils.RemoveEnd("www.domain.com", ".com")   = "www.domain"
#StringUtils.RemoveEnd("www.domain.com", "domain") = "www.domain.com"

#StringUtils.RemoveEnd("www.domain.com", ".COM", ignorecase: true) = "www.domain" #StringUtils.RemoveEnd("www.domain.COM", ".com", ignorecase: true) = "www.domain"

string FSCEXPEXT@1.1001:RemoveEnd(
  string str,
  string remove,
  out retval string result,
  optional boolean ignorecase)

Name

Description

str

the string

remove

the string to remove

result

the new string

ignorecase

compare case insensitive

FSCEXPEXT@1.1001:RemoveStart Permanent link for this heading

Removes a substring only if it is at the beginning of a source string, otherwise returns the source string.

A null or empty string will return null.
A null or empty remove string will return the source string.
The comparison is case-sensitive if ignorecase is null or false.
#StringUtils.RemoveStart(null, *)      = null
#StringUtils.RemoveStart("", *)        = null
#StringUtils.RemoveStart(*, null)      =
#StringUtils.RemoveStart(*, "")        =
#StringUtils.RemoveStart("www.domain.com", "www.")  = "domain.com"
#StringUtils.RemoveStart("www.domain.com", ".com")  = "www.domain.com"
#StringUtils.RemoveStart("www.domain.com", "domain") = "www.domain.com"

#StringUtils.RemoveStart("www.domain.com", "WWW.", ignorecase: true) = "domain.com" #StringUtils.RemoveStart("WWW.domain.com", "www.", ignorecase: true) = "domain.com"

string FSCEXPEXT@1.1001:RemoveStart(
  string str,
  string remove,
  out retval string result,
  optional boolean ignorecase)

Name

Description

str

the string

remove

the string to remove

result

the new string

ignorecase

compare case insensitive

FSCEXPEXT@1.1001:Repeat Permanent link for this heading

Repeat a string.

A null or empty source string returns null.
An invalid or negative repeat is treated as zero.
A null separator is treated as empty and not inserted.
#StringUtils.Repeat(null, 2) = null
#StringUtils.Repeat("", 2)   = null
#StringUtils.Repeat("x", 2)   = "xx"

#StringUtils.Repeat("", 3, separator: "x") = "xx" #StringUtils.Repeat("?", 3, separator: ", ") = "?, ?, ?"

string FSCEXPEXT@1.1001:Repeat(
  string str,
  integer repeat,
  out retval string result,
  optional string separator)

Name

Description

str

the string

repeat

the repetitions requested

result

the new string

separator

the pattern to separate repetitions

FSCEXPEXT@1.1001:Replace Permanent link for this heading

Replaces a string with another string inside a larger string, for the first maxreplace values of the search string.

A null or empty input string input returns null.
A null or empty search string input returns the source string.
A null or negative maxreplace value will replace all occurrences.
The comparison is case-sensitive if ignorecase is null or false.
#StringUtils.Replace(null, *, *)            = null
#StringUtils.Replace("", *, *)              = null
#StringUtils.Replace("any", null, *)        = "any"
#StringUtils.Replace("any", "", *)          = "any"
#StringUtils.Replace("aba", "a", "")        = "b"
#StringUtils.Replace("aba", "a", "z")       = "zbz"

#StringUtils.Replace("abaa", "a", "", maxreplace:-1) = "b" #StringUtils.Replace("abaa", "a", "z", maxreplace:0) = "abaa" #StringUtils.Replace("abaa", "a", "z", maxreplace:1) = "zbaa" #StringUtils.Replace("abaa", "a", "z", maxreplace:2) = "zbza" #StringUtils.Replace("abaa", "a", "z", maxreplace:-1) = "zbzz"

#StringUtils.Replace("abaa", "A", "z", ignorecase: true) = "zbzz"

string FSCEXPEXT@1.1001:Replace(
  string str,
  string search,
  string replace,
  out retval string result,
  optional integer maxreplace,
  optional boolean ignorecase)

Name

Description

str

the string

search

the string to be replaced

replace

the string to use as replacement

result

the new string

maxreplace

the maximum amount of replacements to make

ignorecase

compare case insensitive

FSCEXPEXT@1.1001:Reverse Permanent link for this heading

Reverses a string.

A null or empty string returns null.
An optional separator may be used to specify parts instead of characters to be reversed.
The comparison is case-sensitive if ignorecase is null or false.
#StringUtils.Reverse(null)  = null
#StringUtils.Reverse("")    = null
#StringUtils.Reverse("bat") = "tab"

#StringUtils.Reverse("www.domain.com", separator: ".") = "com.domain.www" #StringUtils.Reverse("a.b.c", separator: 'x') = "a.b.c" #StringUtils.Reverse("aXbXc", separator: 'X') = "cXbXa"

#StringUtils.Reverse("aXbXc", separator: 'x', ignorecase: true) = "cxbxa"

string FSCEXPEXT@1.1001:Reverse(
  string str,
  out retval string result,
  optional string separator,
  optional boolean ignorecase)

Name

Description

str

the string

result

the new string

separator

the separator used to break the string into parts

ignorecase

compare case insensitive

FSCEXPEXT@1.1001:Right Permanent link for this heading

Gets the rightmost length characters of a string.

A null or empty input string returns null.
If length is negative, null is returned.
If length characters are not available, the string is returned.
#StringUtils.Right(null, *)    = null
#StringUtils.Right(*, -1)      = null
#StringUtils.Right("", *)      = null
#StringUtils.Right("abc", 0)   = null
#StringUtils.Right("abc", 2)   = "bc"
#StringUtils.Right("abc", 4)   = "abc"

string FSCEXPEXT@1.1001:Right(
  string str,
  integer length,
  out retval string result)

Name

Description

str

the string

length

the requested length

result

the substring

FSCEXPEXT@1.1001:RightPad Permanent link for this heading

Right pad a string.

A null input string is treated as the empty string (" ").
The string is padded to the length of length.
If length is null or negative, the string is returned.
If pad is null or empty, a single space (' ') is used.
#StringUtils.RightPad(null, 3)   = "   "
#StringUtils.RightPad("", 3)     = "   "
#StringUtils.RightPad("bat", 3)  = "bat"
#StringUtils.RightPad("bat", 5)  = "bat  "
#StringUtils.RightPad("bat", 1)  = "bat"
#StringUtils.RightPad("bat", -1) = "bat"
#StringUtils.RightPad("", 3, 'z')     = "zzz"
#StringUtils.RightPad("bat", 3, 'z')  = "bat"
#StringUtils.RightPad("bat", 5, 'z')  = "batzz"
#StringUtils.RightPad("bat", 1, 'z')  = "bat"
#StringUtils.RightPad("bat", -1, 'z') = "bat"
#StringUtils.RightPad("", 3, "z")      = "zzz"
#StringUtils.RightPad("bat", 3, "yz")  = "bat"
#StringUtils.RightPad("bat", 6, "yz")  = "batyzy"
#StringUtils.RightPad("bat", 8, "yz")  = "batyzyzy"
#StringUtils.RightPad("bat", 1, "yz")  = "bat"
#StringUtils.RightPad("bat", -1, "yz") = "bat"
#StringUtils.RightPad("bat", 5, null)  = "bat  "
#StringUtils.RightPad("bat", 5, "")    = "bat  "

string FSCEXPEXT@1.1001:RightPad(
  string str,
  integer length,
  optional string pad,
  out optional retval string result)

Name

Description

str

the string

length

the requested length

pad

the padding to use to extend the string

result

the padded string

FSCEXPEXT@1.1001:Split Permanent link for this heading

Splits the provided text into an array.

A null or empty input string returns null.
A null separator splits on whitespace.
The separator is not included in the returned string array.
Adjacent separators are treated as one separator, if preservealltokens is null or false.
Every single character of separator is used to split, if wholeseparator is null or false.
The comparison is case-sensitive if ignorecase is null or false.

Note: An empty array is invalid and is treated as null by definition.

If more than max delimited substrings are found, the last returned string includes all characters after the first max - 1 returned strings (including separator characters).
#StringUtils.Split(null)            = null
#StringUtils.Split("")              = null
#StringUtils.Split("abc def")       = ["abc", "def"]
#StringUtils.Split("abc  def")      = ["abc", "def"]
#StringUtils.Split(" abc ")         = ["abc"]

#StringUtils.Split(null, *) = null #StringUtils.Split("", *) = null #StringUtils.Split("a.b.c", '.') = ["a", "b", "c"] #StringUtils.Split("a..b.c", '.') = ["a", "b", "c"] #StringUtils.Split("a:b:c", '.') = ["a:b:c"] #StringUtils.Split("a b c", ' ') = ["a", "b", "c"]

#StringUtils.Split("abc def", null) = ["abc", "def"] #StringUtils.Split("abc def", " ") = ["abc", "def"] #StringUtils.Split("abc def", " ") = ["abc", "def"] #StringUtils.Split("ab:cd:ef", ":") = ["ab", "cd", "ef"]

#StringUtils.Split(null, *, *) = null #StringUtils.Split("", *, *) = null #StringUtils.Split("ab cd ef", null, 0) = ["ab", "cd", "ef"] #StringUtils.Split("ab cd ef", null, 0) = ["ab", "cd", "ef"] #StringUtils.Split("ab:cd:ef", ":", 0) = ["ab", "cd", "ef"] #StringUtils.Split("ab:cd:ef", ":", 2) = ["ab", "cd:ef"]

#StringUtils.Split("ab de fg", null, preservealltokens: true, wholeseparator: true) = ["ab", "de", "fg"] #StringUtils.Split("ab de fg", null, preservealltokens: true, wholeseparator: true) = ["ab", "", "", "de", "fg"] #StringUtils.Split("ab:cd:ef", ":", preservealltokens: true, wholeseparator: true) = ["ab", "cd", "ef"] #StringUtils.Split("ab-!-cd-!-ef", "-!-", preservealltokens: true, wholeseparator: true) = ["ab", "cd", "ef"]

#StringUtils.Split("abXcdXef", "x", 2, ignorecase: true) = ["ab", "cdXef"] #StringUtils.Split("ab-x-cd-x-ef", "-X-", preservealltokens: true, wholeseparator: true, ignorecase: true) = ["ab", "cd", "ef"]

string[] FSCEXPEXT@1.1001:Split(
  string str,
  optional string separator,
  optional integer max,
  out optional retval string[] result,
  optional boolean preservealltokens,
  optional boolean wholeseparator,
  optional boolean ignorecase)

Name

Description

str

the string

separator

the separator to split the string into parts

max

the maximum amount of the result list

result

the list of parts

preservealltokens

keep empty tokens, too

wholeseparator

treat separator as a string pattern to split, not as set of characters to split on each occurrence

ignorecase

compare case insensitive

FSCEXPEXT@1.1001:StartsWith Permanent link for this heading

Check if a string starts with a specified prefix.

Two null references are considered to be equal. The comparison is case-sensitive if ignorecase is null or false.
#StringUtils.StartsWith(null, null)      = true
#StringUtils.StartsWith(null, "abc")     = false
#StringUtils.StartsWith("abcdef", null)  = true
#StringUtils.StartsWith("abcdef", "abc") = true
#StringUtils.StartsWith("ABCDEF", "abc") = false

#StringUtils.StartsWith("abcdef", "abc", ignorecase: true) = true #StringUtils.StartsWith("ABCDEF", "abc", ignorecase: true) = true

boolean FSCEXPEXT@1.1001:StartsWith(
  string str,
  string prefix,
  out retval boolean result,
  optional boolean ignorecase)

Name

Description

str

the string

prefix

string to match

result

the boolean result

ignorecase

compare case insensitive

FSCEXPEXT@1.1001:StartsWithAny Permanent link for this heading

Check if a string starts with a specified list of prefix strings.

The comparison is case-sensitive if ignorecase is null or false.
#StringUtils.StartsWithAny(null, null)     = false
#StringUtils.StartsWithAny(null, ["abc"])  = false
#StringUtils.StartsWithAny("abcxyz", null) = false
#StringUtils.StartsWithAny("abcxyz", ["abc"]) = true
#StringUtils.StartsWithAny("abcxyz", ["xyz", "abc"]) = true
#StringUtils.StartsWithAny("abcxyz", ["xyz", "ABCX"]) = false
#StringUtils.StartsWithAny("ABCXYZ", ["xyz", "abc"]) = false

#StringUtils.StartsWithAny("abcxyz", ["abc"], ignorecase: true) = true #StringUtils.StartsWithAny("abcxyz", ["xyz", "abc"], ignorecase: true) = true #StringUtils.StartsWithAny("abcxyz", ["xyz", "ABCX"], ignorecase: true) = true #StringUtils.StartsWithAny("ABCXYZ", ["xyz", "abc"], ignorecase: true) = true

boolean FSCEXPEXT@1.1001:StartsWithAny(
  string str,
  string[] prefix,
  out retval boolean result,
  optional boolean ignorecase)

Name

Description

str

the string

prefix

list of strings to match

result

the boolean result

ignorecase

compare case insensitive

FSCEXPEXT@1.1001:Strip Permanent link for this heading

Strips any of a set of characters from both ends and allows the characters to be stripped to be controlled.

An null or empty input string returns null. If stripchars is null or empty, whitespace is stripped.
#StringUtils.Strip(null, *)       = null
#StringUtils.Strip("", *)         = null
#StringUtils.Strip("   ")         = null
#StringUtils.Strip("abc")         = "abc"
#StringUtils.Strip("  abc")       = "abc"
#StringUtils.Strip("abc  ")       = "abc"
#StringUtils.Strip(" abc ")       = "abc"
#StringUtils.Strip(" ab c ")      = "ab c"
#StringUtils.Strip("x abcyx", stripchars: "xyz") = " abc"

string FSCEXPEXT@1.1001:Strip(
  string str,
  optional string stripchars,
  out retval string result)

Name

Description

str

the string

stripchars

set of characters to strip

result

the new string

FSCEXPEXT@1.1001:Substring Permanent link for this heading

Get part of a string.

A null or empty string will return null.
A startindex greater or equal to string length will return null.
A startindex that is negative, will be set to string length minus the negative value.
An endindex, that is negative, will be set to string length minus the negative value.
An endindex, that is null, will use the end of the string.
#StringUtils.Substring(null, *)   = null
#StringUtils.Substring("", *)     = null
#StringUtils.Substring("abc", 0)  = "abc"
#StringUtils.Substring("abc", 2)  = "c"
#StringUtils.Substring("abc", 4)  = null
#StringUtils.Substring("abc", -2) = "bc"
#StringUtils.Substring("abc", -4) = "abc"
#StringUtils.Substring(null, *, *)    = null
#StringUtils.Substring("", * ,  *)    = null;
#StringUtils.Substring("abc", 0, 2)   = "ab"
#StringUtils.Substring("abc", 2, 0)   = null
#StringUtils.Substring("abc", 2, 4)   = "c"
#StringUtils.Substring("abc", 4, 6)   = null
#StringUtils.Substring("abc", 2, 2)   = null
#StringUtils.Substring("abc", -2, -1) = "b"
#StringUtils.Substring("abc", -4, 2)  = "ab"

string FSCEXPEXT@1.1001:Substring(
  string str,
  integer startindex,
  optional integer endindex,
  out optional retval string result)

Name

Description

str

the string

startindex

index of start of substring

endindex

index of end of of substring

result

the new substring

FSCEXPEXT@1.1001:SubstringAfter Permanent link for this heading

Gets the substring after the first occurrence of a separator. The separator is not returned.

A null or empty string input will return null.
A null or empty separator will return null.
The comparison is case-sensitive if ignorecase is null or false.
If nothing is found, null is returned.
#StringUtils.SubstringAfter(null, *)      = null
#StringUtils.SubstringAfter("", *)        = null
#StringUtils.SubstringAfter(*, null)      = null
#StringUtils.SubstringAfter("abc", "a")   = "bc"
#StringUtils.SubstringAfter("abcba", "b") = "cba"
#StringUtils.SubstringAfter("abc", "c")   = null
#StringUtils.SubstringAfter("abc", "d")   = null

#StringUtils.SubstringAfter("abcba", "B", ignorecase: true) = "cba"

string FSCEXPEXT@1.1001:SubstringAfter(
  string str,
  string separator,
  out retval string result,
  optional boolean ignorecase)

Name

Description

str

the string

separator

the separator to search

result

the new substring

ignorecase

compare case insensitive

FSCEXPEXT@1.1001:SubstringAfterLast Permanent link for this heading

Gets the substring after the last occurrence of a separator. The separator is not returned.

A null or empty string input will return null.
A null or empty separator will return null.
If nothing is found, null is returned.
The comparison is case-sensitive if ignorecase is null or false.
A null string input will return null.
#StringUtils.SubstringAfterLast(null, *)      = null
#StringUtils.SubstringAfterLast("", *)        = null
#StringUtils.SubstringAfterLast(*, "")        = null
#StringUtils.SubstringAfterLast(*, null)      = null
#StringUtils.SubstringAfterLast("abc", "a")   = "bc"
#StringUtils.SubstringAfterLast("abcba", "b") = "a"
#StringUtils.SubstringAfterLast("abc", "c")   = null
#StringUtils.SubstringAfterLast("a", "a")     = null
#StringUtils.SubstringAfterLast("a", "z")     = null

#StringUtils.SubstringAfterLast("abcba", "B", ignorecase: true) = "a"

string FSCEXPEXT@1.1001:SubstringAfterLast(
  string str,
  string separator,
  out retval string result,
  optional boolean ignorecase)

Name

Description

str

the string

separator

the separator to search

result

the new substring

ignorecase

compare case insensitive

FSCEXPEXT@1.1001:SubstringBefore Permanent link for this heading

Gets the substring before the first occurrence of a separator. The separator is not returned.

A null or empty string input will return null.
A null or empty separator will return the input string.
The comparison is case-sensitive if ignorecase is null or false.
If nothing is found, the string input is returned.
#StringUtils.SubstringBefore(null, *)      = null
#StringUtils.SubstringBefore("", *)        = null
#StringUtils.SubstringBefore("abc", "a")   = null
#StringUtils.SubstringBefore("abcba", "b") = "a"
#StringUtils.SubstringBefore("abc", "c")   = "ab"
#StringUtils.SubstringBefore("abc", "d")   = "abc"
#StringUtils.SubstringBefore("abc", "")    = "abc"
#StringUtils.SubstringBefore("abc", null)  = "abc"

#StringUtils.SubstringBefore("abC", "c", ignorecase: true) = "ab"

string FSCEXPEXT@1.1001:SubstringBefore(
  string str,
  string separator,
  out retval string result,
  optional boolean ignorecase)

Name

Description

str

the string

separator

the separator to search

result

the new substring

ignorecase

compare case insensitive

FSCEXPEXT@1.1001:SubstringBeforeLast Permanent link for this heading

Gets the substring before the last occurrence of a separator. The separator is not returned.

A null or empty string input will return null.
A null or empty separator will return the input string.
The comparison is case-sensitive if ignorecase is null or false.
If nothing is found, the string input is returned.
#StringUtils.SubstringBeforeLast(null, *)      = null
#StringUtils.SubstringBeforeLast("", *)        = null
#StringUtils.SubstringBeforeLast("abcba", "b") = "abc"
#StringUtils.SubstringBeforeLast("abc", "c")   = "ab"
#StringUtils.SubstringBeforeLast("a", "a")     = null
#StringUtils.SubstringBeforeLast("a", "z")     = "a"
#StringUtils.SubstringBeforeLast("a", null)    = "a"
#StringUtils.SubstringBeforeLast("a", "")      = "a"

#StringUtils.SubstringBeforeLast("abcBa", "b", ignorecase: true) = "abc"

string FSCEXPEXT@1.1001:SubstringBeforeLast(
  string str,
  string separator,
  out retval string result,
  optional boolean ignorecase)

Name

Description

str

the string

separator

the separator to search

result

the new substring

ignorecase

compare case insensitive

FSCEXPEXT@1.1001:SubstringBetween Permanent link for this heading

Gets the string that is nested in between two strings. The first match is returned.

A null or empty input string returns null.
A null or empty openstr or closestr returns null.
If openstr or closestr is not found, null is returned.
The comparison is case-sensitive if ignorecase is null or false.
#StringUtils.SubstringBetween("wx[b]yz", "[", "]") = "b"
#StringUtils.SubstringBetween(null, *, *)          = null
#StringUtils.SubstringBetween(*, null, *)          = null
#StringUtils.SubstringBetween(*, *, null)          = null
#StringUtils.SubstringBetween("", "", "")          = null
#StringUtils.SubstringBetween("", "", "]")         = null
#StringUtils.SubstringBetween("", "[", "]")        = null
#StringUtils.SubstringBetween("yabcz", "", "")     = null
#StringUtils.SubstringBetween("yabcz", "y", "z")   = "abc"
#StringUtils.SubstringBetween("yabcz", "y", "x")   = null
#StringUtils.SubstringBetween("yabczyabcz", "y", "z")   = "abc"

#StringUtils.SubstringBetween("yabczyabcz", "Ya", "Z", ignorecase: true) = "bc"

string FSCEXPEXT@1.1001:SubstringBetween(
  string str,
  string openstr,
  string closestr,
  out retval string result,
  optional boolean ignorecase)

Name

Description

str

the string

openstr

the open string to search

closestr

the close string to search

result

the substring

ignorecase

compare case insensitive

FSCEXPEXT@1.1001:SubstringsBetween Permanent link for this heading

Gets the strings that are nested in between two strings.

A null or empty input string returns null.
A null or empty openstr or closestr returns null.
If openstr or closestr is not found, no substring is added.
The comparison is case-sensitive if ignorecase is null or false.
#StringUtils.SubstringsBetween("[a][b][c]", "[", "]") = ["a","b","c"]
#StringUtils.SubstringsBetween(null, *, *)            = null
#StringUtils.SubstringsBetween(*, null, *)            = null
#StringUtils.SubstringsBetween(*, *, null)            = null
#StringUtils.SubstringsBetween("", "[", "]")          = null

#StringUtils.SubstringsBetween("yabzyacz", "Ya", "Z", ignorecase: true) = ["b","c"]

string[] FSCEXPEXT@1.1001:SubstringsBetween(
  string str,
  string openstr,
  string closestr,
  out retval string[] result,
  optional boolean ignorecase)

Name

Description

str

the string

openstr

the open string to search

closestr

the close string to search

result

the substrings

ignorecase

compare case insensitive

FSCEXPEXT@1.1001:Trim Permanent link for this heading

Removes control characters from both ends.

An null or empty input string returns null. To strip whitespace or specific characters use Strip. Control characters are characters with character codes up to 32.
#StringUtils.Trim(null)          = null
#StringUtils.Trim("")            = null
#StringUtils.Trim("     ")       = null
#StringUtils.Trim("abc")         = "abc"
#StringUtils.Trim("    abc    ") = "abc"

string FSCEXPEXT@1.1001:Trim(
  string str,
  out retval string result)

Name

Description

str

the string

result

the boolean result

FSCEXPEXT@1.1001:UpperCase Permanent link for this heading

Converts a string to upper case.
#StringUtils.UpperCase(null)  = null
#StringUtils.UpperCase("")    = null
#StringUtils.UpperCase("aBc") = "ABC"

string FSCEXPEXT@1.1001:UpperCase(
  string str,
  out retval string result)

Name

Description

str

the string

result

the new string in upper case.