.substring() / .contains()
Substring extraction and searching.
Syntax
text.substring(start, [end]) // text.contains(part)
Description
substring extracts a piece using start (inclusive) and end (exclusive) indices. contains tells whether a piece exists (true/false).
Example
Loading editor…
Expected output
Hex true
When to use?
Trimming text, search boxes.