Module sv_string

String utilities

Functions

Split (inputstr, sep) Split function.
Capitalise (str) Capitalise function.
Compare (str1, str2) Compare function.


Functions

Split (inputstr, sep)
Split function. This function splits a string into a table.

Parameters:

  • inputstr The string to split.
  • sep The separator.

Returns:

    table

Usage:

    local tbl = exports.sd_util:Split("Hello World", " ")
Capitalise (str)
Capitalise function. This function capitalises the first letter of a string.

Parameters:

  • str The string to capitalise.

Returns:

    string

Usage:

    local str = exports.sd_util:Capitalise("hello world")
Compare (str1, str2)
Compare function. This function compares two strings.

Parameters:

  • str1 The first string.
  • str2 The second string.

Returns:

    boolean

Usage:

    local bool = exports.sd_util:Compare("hello world", "HELLO WORLD")
generated by LDoc 1.5.0 Last updated 2023-11-28 19:34:18