starts_with

From Kolmafia
Revision as of 12:12, 23 December 2020 by Philmasterplus (talk | contribs) (Created page with "<onlyinclude>{{{{{format|Function2}}} |name=starts_with |function1.return_type=boolean |function1.description=Checks whether a string starts with a prefix string. (case-sensit...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function Syntax

boolean starts_withstring value, string prefix )

Checks whether a string starts with a prefix string. (case-sensitive)
  • value: String to check
  • prefix: Prefix to search for

This function was added in r17911.

Code Samples

The following function call will return true:

starts_with( "The quick brown fox jumps over the lazy dog", "The quick" );

See Also

contains_text() | ends_with() | index_of() | last_index_of() | starts_with()