Skip to content
Anssi Halmeaho edited this page Apr 30, 2020 · 1 revision

stdstr

String manipulation services.

Functions

lowercase

Converts string to such that all characters are mapped to their lowercase.

type: function

Format:

call(stdstr.lowercase <string>) -> <string-lowercase>

Return value: string

uppercase

Converts string to such that all characters are mapped to their uppercase.

type: function

Format:

call(stdstr.uppercase <string>) -> <string-uppercase>

Return value: string

replace

Returns a copy of the string s with all non-overlapping instances of sub-string replaced by (sub-)string.

type: function

Format:

call(stdstr.replace <source-string> <old-substring> <new-substring>) -> <result-string>

Return value: string (result)

strip

Returns string from which all leading and trailing whitespace characters are removed.

type: function

Format:

call(stdstr.strip <source-string>) -> <result-string>

Return value: string (result)

rstrip

Returns string from which all trailing whitespace characters are removed.

type: function

Format:

call(stdstr.rstrip <source-string>) -> <result-string>

Return value: string (result)

lstrip

Returns string from which all leading whitespace characters are removed.

type: function

Format:

call(stdstr.lstrip <source-string>) -> <result-string>

Return value: string (result)

join

Concatenates string items in list (1st argument) to create single string. The separator string (2nd argument) is placed between elements in the resulting string. (if it it's '' then no separator is put between)

type: function

Arguments:

  1. list of strings (to be concatenated)
  2. separator string

Format:

call(stdstr.join <list-of-strings> <separator>) -> <result-string>

Return value: string (result)

startswith

Returns true if string (1st argument) starts with given substring (2nd argument), false otherwise.

type: function

Format:

call(stdstr.startswith <string> <substring>) -> <bool>

Return value: bool

endswith

Returns true if string (1st argument) ends with given substring (2nd argument), false otherwise.

type: function

Format:

call(stdstr.endswith <string> <substring>) -> <bool>

Return value: bool

is-space

Returns true if all characters in string are whitespace characters, false otherwise.

type: function

Format:

call(stdstr.is-space <string>) -> <bool>

Return value: bool

is-digit

Returns true if all characters in string are decimal digits, false otherwise.

type: function

Format:

call(stdstr.is-digit <string>) -> <bool>

Return value: bool

is-lower

Returns true if all characters in string are lowercase, false otherwise.

type: function

Format:

call(stdstr.is-lower <string>) -> <bool>

Return value: bool

is-upper

Returns true if all characters in string are uppercase, false otherwise.

type: function

Format:

call(stdstr.is-upper <string>) -> <bool>

Return value: bool

is-alpha

Returns true if all characters in string are letters (lowercase or uppercase), false otherwise.

type: function

Format:

call(stdstr.is-alpha <string>) -> <bool>

Return value: bool

is-alnum

Returns true if all characters in string are alphanumeric (letters or numbers), false otherwise.

type: function

Format:

call(stdstr.is-alnum <string>) -> <bool>

Return value: bool

Clone this wiki locally