String functions

Functions to read and manipulate string variables.

Gui­d
Create a random guid.
Guid­2
Create a random guid in base64 RFC7515 format.
MD­5(text)
A utility function that takes a single input, converts it to a string, processes it through the MD5 hashing algorithm, and returns the hash value as an uppercase hexadecimal string. If provided with incorrect arguments, it returns null.
SHA25­6(text)
A utility function that takes a single input, converts it to a string, processes it through the SHA256 hashing algorithm, and returns the hash value as an uppercase hexadecimal string. If provided with incorrect arguments, it returns null.
Temp­late li­teral (temp­lat­e st­rings­)
Template literals are strings that can cross multiple lines and easily bind in values through single JS expressions inside the string. The strings are started and ended with the ` symbol. Expressions are started with ${ ... } inside the string.
Text­Deco­d­e(bytes, encoding)
Converts a byte array to a string using the specified encoding.
Tex­tEn­cod­e(text, encoding)
Converts a string into bytes using the specified encoding.
Text­ToHt­ml(text, text2, ...)
Converts multi line plain text to HTML.
En­code­Fil­ena­me(filename)
Encode a filename by replacing characters not allowed in filenames with their ASCII code representations. Reverse function of DecodeFilename.
De­code­Fil­ena­me(filename)
Decode an encoded filename string by replacing ASCII code representations with symbols (not allowed in filenames). Reverse function of EncodeFilename.
en­codeU­RI(text)
Encodes a URI by replacing certain characters by escape sequences representing the UTF-8 encoding of the characters.
en­codeU­RI­Com­ponen­t(text)
Encodes a URI by replacing certain characters by escape sequences representing the UTF-8 encoding of the characters.
Htm­lAtt­ri­bu­teEn­cod­e(text)
The HtmlAttributeEncode method encodes characters appropriate for insertion into an HTML attribute value
Htm­lEn­cod­e(text)
Converts a string into an HTML-encoded string.
JsSt­rin­gE­nco­de ob­sole­te(text)
Encodes a string so it escapes all special chars.
Re­moveEm­pty­Line­s(text)
Remove all empty lines (if any) from a string.
St­ring.­co­nca­t(string1, string2, ...)
Combines multiple strings into one string. Function may be called with one or a "whole bunch" of strings in as parameters.
St­ring­.in­clu­des(search)
The includes() method returns true if a string contains a specified string.
St­ring­.in­d­exO­f(text)
Searches the entire calling string, and returns the index of the first occurrence of the specified substring.
St­ring.­la­stIn­dexO­f(text)
Searches for last occurence of a substring within a string.
St­ring.­no­rma­lize
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize
St­ring.­re­pea­t(times)
Repeats a string a specified number times and returns the new value.
St­ring.­re­pla­ce(find, replace)
Replaces specified text in a specific string with another text.
St­ring.s­pli­t(seperator)
Splits a single string into an array of strings based on specified seperator.
St­ring­.en­ds­Wit­h(text)
Searches the end of the string, and returns a boolean that is True if the string ends with this text otherwise False.
St­ring.s­t­arts­Wit­h(text)
Searches the start of the string, and returns a boolean that is True if the string starts with this text otherwise False.
St­ring.t­r­im
Removes spaces before and after a text in a string.
St­rip­Tag­s(html)
Removes all tags from a string
Ur­lEn­code(text)
Converts a string into a URL-encoded format, replacing unsafe characters with a percent sign followed by two hexadecimal digits representing the character's ASCII code.