Xojo Conferences
MBSOct2019CologneDE

Platforms to show: All Mac Windows Linux Cross-Platform

Previous items

StringHandleMBS.RightUTF8(lengthCharacter as integer) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method String MBS DataTypes Plugin 19.1 Yes Yes Yes Yes No
Function: Queries given number of characters from string from the right side.
Example:
Dim s As String = "Hello öäü!"
Dim d As New StringHandleMBS(s)

d.Encoding = d.encodingUTF8

// ö is two bytes
MsgBox d.RightUTF8(8)+" in UTF8 and "+d.Right(8)+" in bytes"

Feedback, Comments & Corrections

StringHandleMBS.Truncate(lengthBytes as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method String MBS DataTypes Plugin 3.1 Yes Yes Yes Yes No
Function: Truncates the string handle content.
Notes:
Sets the length of the string back to the given value if it's greater.

The length parameter uses bytes not charcters as unit. You can use the Copy method to get a RB string for characterwise editing.

Feedback, Comments & Corrections

StringHandleMBS.TruncateUTF8(lengthCharacters as integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method String MBS DataTypes Plugin 19.2 Yes Yes Yes Yes No
Function: Truncates data to given number of UTF-8 characters.
Example:
Dim s As New StringHandleMBS("äöü")

// limit to 2 characters, here 4 bytes
s.TruncateUTF8 2

MsgBox s.Copy

Feedback, Comments & Corrections

Previous items

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

The biggest plugin in space...




Links
MBS Xojo tutorial videos