SortMBS delegates

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

Back to SortMBS module.

SortMBS.SortVariantDelegateStringMBS(v1 as String, v2 as String) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
delegate Sort MBS Util Plugin 24.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The delegate to compare two string values.
Example
Public Function CompareString2ndWord(s1 as string, s2 as string) As integer
// sort by second word

s1 = s1.NthField(" ",2)
s2 = s2.NthField(" ",2)

Return s1.Compare(s2)
End Function

Sub Test
Dim testString() As String = Array("Hello World", "Hallo Leute", "World Test", "First Entry", "abc def", "abc xyz")
SortArrayMBS testString, AddressOf CompareString2ndWord

Break // see in debugger
End Sub

Return 0 if equal, 1 if first value is bigger or -1 if first value is smaller.

Some methods using this delegate:

The items on this page are in the following plugins: MBS Util Plugin.


💬 Ask a question or report a problem