DLiteScript
Playground
Documentation
strings Namespace
String manipulation functions.
strings.endsWith
Check if a string ends with a specific suffix. Test string endings to validate patterns and file extensions in your code. Part of the strings namespace.
strings.find
Find the first occurrence of a substring. Search for text patterns in strings and return the matching substring or empty string. Part of the strings namespace.
strings.has
Check if a string contains a specific substring. Test for text presence within strings for validation and conditional logic. Part of the strings namespace.
strings.indexOf
Find the index position of the first substring occurrence. Return the starting position of text in a string, or -1 if not found. Part of the strings namespace.
strings.lastIndexOf
Find the index position of the last substring occurrence. Return the final position of text in a string, or -1 if not found. Part of the strings namespace.
strings.length
Get the character length of a string. Return the number of characters in a text value for validation and string operations. Part of the strings namespace.
strings.replace
Replace the first occurrence of a substring. Find and substitute text patterns in strings for single replacements. Part of the strings namespace.
strings.replaceAll
Replace all occurrences of a substring. Find and substitute all matching text patterns in strings for global replacements. Part of the strings namespace.
strings.split
Split a string into an array using a delimiter. Divide text into parts based on separator for array processing and parsing. Part of the strings namespace.
strings.startsWith
Check if a string starts with a specific prefix. Test string beginnings to validate patterns and identify prefixes in text. Part of the strings namespace.
strings.substring
Extract a portion of a string between two indices. Get substring by start and end character positions for text manipulation. Part of the strings namespace.
strings.toLower
Convert a string to lowercase. Transform all uppercase letters to lowercase for case-insensitive comparisons or normalization. Part of the strings namespace.
strings.toUpper
Convert a string to uppercase. Transform all lowercase letters to uppercase for formatting and text normalization operations. Part of the strings namespace.
strings.trim
Remove whitespace from both ends of a string. Strip leading and trailing spaces, tabs, and newlines for clean text processing. Part of the strings namespace.
strings.trimLeft
Remove whitespace from the start of a string. Strip leading spaces, tabs, and newlines from the beginning of text values. Part of the strings namespace.
strings.trimRight
Remove whitespace from the end of a string. Strip trailing spaces, tabs, and newlines from the end of text values for formatting. Part of the strings namespace.