Skip to Content
DocumentationGet StartedModulesString Modules

The Zare provides some basic functions to perform some operations on strings.

Import String Module

string.zare
use string

Example

string.zare
use string serve ( <h1>@upper(username)</h1> <h1>@trim(bio)</h1> )

Methods

MethodArgumentsDescription
@length()stringreturn the length of string
@upper()stringconvert to upper case
@lower()stringconvert to lower case
@at()string, indexreturn the character at index
@codeAt()string , indexreturn the character code at index
@slice()string , start (Index) , end (Index)slice from start to end index
@subString()string, start (Index), end (Index)return the sub string from start to end
@concat()string, stringconcatenates two strings
@trim()stringtrims the string
@trimStart()stringtrims the string from start
@trimEnd()stringtrims the string from end
@repeat()string, countrepeat a string count times
@replace()string, substring1, substring2replace a sub string 1 from string with sub string 2
@replaceAll()string, substring1, substring2replace all substring 1 from string with substring 2
@split()string, sub stringsplit a string bases on the second argument sub string
Last updated on