Advanced Text
From UBot Studio
The Advanced Text Functions consists of functions specific to the manipulation and utilization of text.
List of Advanced Text Functions
- Reverse Text: Reverses text.
- Number Format: Places commas into numbers to make the numbers readable.
- Levenshtein Distance: Calculates levenshtein distance between two strings.
- Clean Text: Trim and replace multiple spaces with a single space.
- Character List: Returns a list of individual characters within a string.
- Swap Case: Returns a copy of the string in which all the case based characters have their case swapped.
- Count Text: Counts the number of times a substring appears in text.
- Escape HTML: Converts HTML characters to their entity equivalents.
- Unescape HTML: Converts entity characters to their HTML equivalents.
- Is Blank: Determines whether text is empty or contains only white space. Returns True or False.
- Is Number: Determines whether text is a number. Returns True or False.
- Starts With: Checks whether a string begins with specified text.
- Ends With: Checks whether a string ends with specified text.
- Camelize: Converts underscored or dasherized string into a camelized one. Begins with a lower case letter unless it starts with an underscore, dash or uppercase letter.
- Classify: Converts string to camelized class name. First letter is always upper case.
- Underscored: Converts camelized or dasherized string to an underscored one.
- Dasherize: Converts camelized or underscored string to dasherized one.
- Humanize: Converts an underscored, dasherized or camelized string into a humanized one. Also removes beginning and ending whitespace, and removed the postfix '_id'.
- Truncate: Cuts text at a specific location, replacing it with "...".
- Prune: Elegant version of truncate. Makes sure the pruned string does not exceed the original length. Avoid half chopped words when truncating.
- Strip Tags: Removes all html tags from string.
- Words: Returns a list of words from a specified text.
- To Sentences: Joins arrays into human readable sentences.
- Repeat Text: Repeat strings a specified number of times.
- Surround Text: Surrounds text with other text.
- Sluggify: Transforms text into an ascii slug which can be used safely in urls. Replaces whitespaces, accentuated and special characters with a dash. Limited set of non-ascii characters are transformed into similar versions in the ascii character set such as ä to a.
- Word Count: Returns the number of words in text.