Gambas Documentation
Application Repository
Code Snippets
Compilation & Installation
Controls pictures
Deprecated components
Developer Documentation
Development Environment Documentation
Error Messages
Gambas Playground
How To's
Language Index
Language Overviews
Arithmetical Functions
Arithmetic Operators
Array Declaration
Assignment Operators
Binary Data Representation
Bits Manipulation Functions
Character Test Functions
Comparison methods
Complex numbers
Constant Declaration
Constant Expression
Conversion Functions
Datatype Functions
Date & Time Functions
Enumeration declaration
Error Management
Event Loop
Event Management
Events declaration
External Function Management
File & Directory Functions
File & Directory Paths
File mode syntax
Floating Point Numbers
Formatting functions
Gambas Object Model
Global Special Event Handlers
Integer numbers
Intrinsic Functions
Language Constants
Localization and Translation Functions
Local Variable Declaration
Logarithms & Exponentials Functions
Logical Operators
Loop Control Structures
Method Declaration
Miscellaneous Control Structures
Miscellaneous Functions
Native Arrays
Native Container Classes
Object & Class Management
Operator Evaluation Order
Predefined Constants
Process Management
Property Declaration
Random Numbers Functions
Special Methods
Stream & Input/Output functions
String Functions
String Operators
Structure declaration
Test Control Structures & Functions
Trigonometric Functions
User-defined formats
Using reserved keywords as identifiers
Variable Declaration
Last Changes
Search the wiki
To Do
Wiki License
Wiki Manual

String Functions

Function Description UTF-8 equivalent
Asc Returns the ASCII code of a character in a string. String.Code
Base64$ Encode a string in Base64.
Since 3.2
Chr$ Returns a character from its ASCII code. String.Chr
Comp Compares two strings. String.Comp
FromBase64$ Decode a Base64 string.
Since 3.7
FromUrl$ Decode an URL.
Since 3.7
Html$ Quotes a string so that it is valid HMTL. -
InStr Searches a string into another string. String.InStr
LCase$ Converts a string to lowercase. String.LCase
Left$ Returns the first characters of a string. String.Left
Len Returns the length of a string. String.Len
LTrim$ Strips white spaces from the left of a string. -
Mid$ Returns a part of a string. String.Mid
Quote$ Quotes a string. -
Replace$ Replaces in a string a substring by another one. -
Right$ Returns the last characters of a string. String.Right
RInStr Searches a string into another string from its right. String.RInStr
RTrim$ Strips white spaces from the right of a string. -
Scan Splits a string against a regular expression pattern. -
Space$ Returns a string containing only space. -
Split Splits a string into substrings. -
String$ Returns the same string concatenated many times. -
Subst$ Substitutes strings in a pattern. -
Trim$ Strips white spaces from a string. -
UCase$ Converts a string to uppercase. String.UCase
UnBase64$ Decode a Base64 string.
Since 3.2
Url$ Encode an URL.
Since 3.7
UnQuote$ Unquotes a string. -

Most of these functions only deal with ASCII strings. To manipulate UTF-8 strings, use the UTF-8 equivalent method of the String class indicated in the third column.

If no UTF-8 equivalent function is indicated, then the ASCII function also works with UTF-8 strings.

See also