string

string:mustache

Mustache template engine


string:append

Add $append to the end of first line or all lines of $string


string:ci_equal?

Question whether two strings are equal without considering case.


string:contains?

Question whether a string contains a substring


string:contains_all_of_these?

Question whether a string contains all of the substrings provided by an array


string:contains_any_of_these?

Question whether a string contains all of the substrings provided by an array


string:count_substring

Get the number of occurrences of substring in the given string.


string:ends_with?

Question whether a string ends with a substring


string:ends_with_any?


string:ensure_end

Ensures that the string ends with $substring. If it doesn't, it's appended.


string:ensure_start

Ensures that the string begins with $substring. If it doesn't, it's prepended.


string:format

Format string c style


string:get_character_by_position

Get a character in a string at a specific position


string:get_indent_level

Get the number of indents levels from the current line


string:get_length

Return the length of a string.


string:get_trimmed_length

Get the length of given string once it is trimmed (removed space)


string:get_word_count

Return the number of words in a given string


string:is_all_uppercase?

Question whether given string is all uppercase.


string:is_blank?

Question whether given string is empty or contains only of space characters


string:is_empty?

Question whether given string is empty


string:is_equal?

Question whether two variables have the same string representation -- when converted to type_string


string:is_multiline?

Question whether given string is multiline


string:is_similar?

Compare equality of two strings while ignoring CASE and extra whitespace.


string:lc_first

Make a string's first character lowercase


string:newline_to_br

Replace newlines with HTML line breaks (<br/>)


string:plain_links_to_html_links

Convert plain URLs and email addresses in text into HTML links


string:pluralize

Turn a word into plural form


string:prepend

Add $prepend to the start of first line or all lines of given $string


string:remove_all_spaces

Remove all space characters (tab, newline, etc) from given string


string:remove_duplicate_words

Remove duplicate words


string:remove_extra_space

Remove unnecessary whitespace from string


string:remove_shared_whitespace_from_start_of_lines

Remove shared whitespace from beggining of every line in the given string


string:repeat

Repeat a string


string:replace

Replace all occurrences of the $search string with the $replacement string


string:replace_multiple

Replace all occurrences of the keys in the given $search array with their respective values


string:reverse

Reverse a string


string:similarity_percent

Get similarity score (from 0 to 100) of two strings


string:similarity_score

Get a weighted score of similarity of two string


string:singularize

Turn a word into singular form


string:split_by_regex

Split a string into array of substrings using regex pattern


string:split_by_substring

Use a substring to split a string into an array of items


string:tabify

Add tabs to the beggining of the lines in a given string


string:create_escaped_single_quotes

Escape single quotes in given string


string:split

Convert string into an array by specifed maximum length of each chunk.


string:split_to_characters

Returns an array consisting of the characters in the string


string:split_to_lines

Returns an array consisting of the lines in the string


string:split_to_words

Returns an array consisting of the words in the string


string:starts_with?

Question whether a string starts with a substring


string:starts_with_any?

Returns true if the string ends with any of $substrings, false otherwise


string:subdomainify

take a name (string) and filter it into a valid part of a subdomain


string:sunsed_code_result?

Detect if $string (a line) is SunSed code result i.e. starts with `#=>`


string:sunsed_ini_to_array


string:tabs_to_spaces

Replace tabs from the beggining of every line in the given source code with 4 (or given #) spaces


string:to_titlecase

Titlecase (capitalize) string


string:to_lower_case

Lowercase string


string:to_snake_case

Turn string into snake case.


string:to_camel_case

Transform string into camel case camelCase


string:to_upper_case

Uppercase string


string:trim

Remove one or multiple substring from the beginning and end of a string -- default: remove whitespace characters


string:trim_end

Remove one or multiple substring from the end of a string -- default: remove whitespace characters


string:trim_start

Remove one or multiple substring from the start of a given string -- default: remove whitespace characters


string:truncate

Truncate given string


string:wrap_words


string:is_valid_hexadecimal?

Check if a string is a valid hexadecimal


string:is_valid_hex_binary_key?

Check if key is a valid hexadecimal representation of SunSed binary key in database.


Copyright © SunSed LLC 2013-2022 All rights reserved.