Platforms to show: All Mac Windows Linux Cross-Platform

Back to StringViewMBS class.

StringViewMBS.Join(strings() as StringViewMBS) as StringMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method String MBS Util Plugin 26.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Joins strings efficiently.
Example
Var strings() As StringViewMBS

strings.Add New StringMBS("Hello")
strings.Add New StringViewMBS(" ")
strings.Add New StringViewMBS("World")

Var j As StringMBS = StringMBS.Join(strings)

MessageBox j.StringValue

See also:

StringViewMBS.Join(strings() as Variant) as StringMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method String MBS Util Plugin 26.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Joins strings efficiently.
Example
Var strings() As Variant

strings.Add New StringMBS("Hello")
strings.Add " "
strings.Add New StringViewMBS("World")

Var j As StringMBS = StringMBS.Join(strings)

MessageBox j.StringValue

Variant can include anything that converts to string or is a StringViewMBS.

See also:

StringViewMBS.ViewFromCharacters(Characters() as UInt32) as StringViewMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method String MBS Util Plugin 26.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a StringView from characters.
Example
Var v As StringViewMBS = StringViewMBS.ViewFromString("Hello")
// let's ger characters
Var Characters() As UInt32 = v.Characters
// inspect in debugger and build to a new string view
Var n As StringViewMBS = StringViewMBS.ViewFromCharacters(Characters)
MessageBox n.StringValue

The text is references in the StringView and not copied.

StringViewMBS.ViewFromData(Data as MemoryBlock) as StringViewMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method String MBS Util Plugin 26.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a StringView from some data.
Example
Var v As StringViewMBS = StringMBS.ViewFromString("Hello")
// let's ger characters as MemoryBlock
Var data as MemoryBlock = v.ToData
// inspect in debugger and build to a new string view
Var n As StringViewMBS = StringMBS.ViewFromData(Data)
MessageBox n.StringValue

The MemoryBlock must contain UTF-32 characters (4 bytes per character).
The text is references in the StringView and not copied.

StringViewMBS.ViewFromString(s as String) as StringViewMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method String MBS Util Plugin 26.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a StringView from a string.
Example
Var v As StringViewMBS = StringViewMBS.ViewFromString("Hello")

MessageBox v.StringValue

The text is references in the StringView and not copied.

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


The biggest plugin in space...