#cp.fn.string

String-related functional programming helpers.


#API Overview

Functions - API calls offered directly by the extension


#API Documentation

#Functions

Signaturecp.fn.string.isEmpty(str) -> boolean
TypeFunction
DescriptionChecks if the string is empty.
Parameters
  • str - The string to check.
Returns
  • true if the string is empty, false otherwise.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/fn/string.lua line 7

Signaturecp.fn.string.match(pattern) -> function(str) -> ...
TypeFunction
DescriptionCreates a function that matches the given pattern. Any groups in the pattern will be returned as multiple values.
Parameters
  • pattern - The pattern to match.
Returns
  • A function that takes a string and returns the matches.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/fn/string.lua line 20