Gambas Documentation
Application Repository
Code Snippets
Compilation & Installation from source code
Components
Controls pictures
Deprecated components
Developer Documentation
Development Environment Documentation
Documents
Error Messages
Gambas Playground
How To's
Language Index
Language Overviews
Arithmetical Functions
Arithmetic Operators
Array Declaration
Assignment Operators
Assignments
Binary Data Representation
Bits Manipulation Functions
Character Test Functions
Comparison methods
Complex numbers
Constant Declaration
Constant Expression
Conversion Functions
Datatype Functions
Datatypes
Date & Time Functions
Enumeration declaration
Error Management
Event Loop
Event Management
Events declaration
Expressions
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
Lexicon
README
Search the wiki
To Do
Topics
Tutorials
Wiki License
Wiki Manual

Comparison methods

These constants are used by the Comp function and each time a sort method is needed. For example, in the Array sort methods, when creating a Collection, in the String class methods, and so on.

gb.Binary Binary comparison (This is the default).
gb.IgnoreCase ASCII case insensitive comparison.
gb.Language Comparison according to the current language.
gb.Language + gb.IgnoreCase Case insensitive comparison according to the current language.
gb.Natural Natural comparison according to the current language.
gb.Natural + gb.IgnoreCase Case insensitive natural comparison according to the current language.
gb.Like The second string is assumed to be a LIKE pattern. If the first string matches it, then equality is returned. Otherwise a case insensitive comparison is done.
gb.Match
Since 3.11
The second string is assumed to be a gb.pcre MATCH pattern. If the first string matches it, then equality is returned. Otherwise a case insensitive comparison is done.

Beware that comparing strings according to the current language (gb.Language) relies on the internal collation support of the glibc library.

Consequently, the result of the sort using a specific language can't be told. You have to check by yourself.

It seems, at least for western European languages, that spaces are ignored by the glibc collation routine.