Functions 38

Function Description
BreakString

Finds the first "argument" in a string; either a set of space terminated characters, or a fully quoted string. After the argument is found, whitespace is read until the next portion of the string is reached. If nothing remains, -1 is returned. Otherwise, the index to the first character is returned.

CharToLower

Converts an uppercase character to its lowercase counterpart.

CharToUpper

Converts a lowercase character to its uppercase counterpart.

ExplodeString

Breaks a string into pieces and stores each piece into an array of buffers.

FindCharInString

Finds the first occurrence of a character in a string.

FloatToString

Converts a floating point number to a string.

Format

Formats a string according to the SourceMod format rules (see documentation).

FormatEx

Formats a string according to the SourceMod format rules (see documentation).

GetCharBytes

Returns the number of bytes a character is using. This is for multi-byte characters (UTF-8). For normal ASCII characters, this will return 1.

ImplodeStrings

Joins an array of strings into one string, with a "join" string inserted in between each given string. This function complements ExplodeString.

Int64ToString

Converts a 64-bit integer to a string.

IntToString

Converts an integer to a string.

IsCharAlpha

Returns whether a character is an ASCII alphabet character.

IsCharLower

Returns whether an alphabetic character is lowercase.

IsCharMB

Returns if a character is multi-byte or not.

IsCharNumeric

Returns whether a character is numeric.

IsCharSpace

Returns whether a character is whitespace.

IsCharUpper

Returns whether an alphabetic character is uppercase.

ReplaceString

Given a string, replaces all occurrences of a search string with a replacement string.

ReplaceStringEx

Given a string, replaces the first occurrence of a search string with a replacement string.

SplitString

Returns text in a string up until a certain character sequence is reached.

StrBreak

StrCat

Concatenates one string onto another.

strcmp

Compares two strings lexographically.

StrCompare

StrContains

Tests whether a string is found inside another string.

strcopy

StrEqual

Returns whether two strings are equal.

StringToFloat

Converts a string to a floating point number.

StringToFloatEx

Converts a string to a floating point number with some more options.

StringToInt

Converts a string to an integer.

StringToInt64

Converts a string to a 64-bit integer.

StringToIntEx

Converts a string to an integer with some more options.

StripQuotes

Strips a quote pair off a string if it exists. That is, the following replace rule is applied once: ^"(.*)"$ -> ^\1$

strlen

Calculates the length of a string.

strncmp

Compares two strings parts lexographically.

TrimString

Removes whitespace characters from the beginning and end of a string.

VFormat

Formats a string according to the SourceMod format rules (see documentation).