Platforms to show: All Mac Windows Linux Cross-Platform
StringHandleMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | String | MBS DataTypes Plugin | 3.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The class initalized itself on the first use.
- 11 properties
- property BlockLen as Int64
- property BlockSize as Int64
- property Encoding as Int64
- property Len as Int64
- property LenUTF8 as Int64
- property ReplaceCount as Int64
- property ValidASCII as Boolean
- property ValidUTF8 as Boolean
- property UInt16Value(offset as Integer) as UInt16
- property UInt32Value(offset as Integer) as UInt32
- property UInt8Value(offset as Integer) as UInt8
- 36 methods
- method Add(data as MemoryBlock)
- method Add(data as Ptr, size as Integer)
- method Add(data as string)
- method Add(data as StringHandleMBS)
- method AddByte(value as UInt8)
- method AddInteger(value as Int64)
- method Clear
- method clone as StringHandleMBS
- method Constructor
- method Constructor(InitValue as MemoryBlock)
- method Constructor(initvalue as string)
- method Copy as string
- method CopyMemory as MemoryBlock
- method Delete(start as Integer, lengthBytes as Integer)
- method Extract(start as Integer, lengthBytes as Integer) as string
- method FindByte(value as UInt8, StartByteOffset as Integer = 1) as Integer
- method FindByte(values() as UInt8, StartByteOffset as Integer = 1) as Integer
- method FirstNonWhiteSpace(StartByteOffset as Integer = 1) as Integer
- method FirstWhiteSpace(StartByteOffset as Integer = 1) as Integer
- method Insert(data as string, position as Integer)
- method InStr(OffsetBytes as Integer = 1, target as String, EndOffsetBytes as Integer = -1) as Integer
- method InStrUTF8(OffsetCharacters as Integer = 1, target as String, EndOffsetCharacters as Integer = -1) as Integer
- method Left(lengthBytes as Integer) as string
- method LeftUTF8(lengthCharacter as integer) as string
- method Mid(startByte as Integer, lengthBytes as Integer) as string
- method MidInteger(startByte As Integer, lengthBytes As Integer = -1) as Int64
- method MidUTF8(startCharacter as integer, lengthCharacter as integer) as string
- method Replace(a as String, b as string)
- method Replace(startpos as Integer, a as String, b as string)
- method ReplaceAll(a as String, b as string)
- method ReplaceAll(startpos as Integer, a as String, b as string)
- method Reverse as StringHandleMBS
- method Right(lengthBytes as Integer) as string
- method RightUTF8(lengthCharacter as integer) as string
- method Truncate(lengthBytes as Integer)
- method TruncateUTF8(lengthCharacters as integer)
- 4 shared methods
- shared method IsValidASCII(data as ptr, TotalByteLength as integer) as Boolean
- shared method IsValidUTF8(data as ptr, TotalByteLength as integer) as Boolean
- shared method UTF8Length(data as ptr, TotalByteLength as integer) as Integer
- shared method UTF8LengthToBytes(data as ptr, TotalByteLength as integer, Characters as Integer) as Integer
- 7 constants
Encodings
Constant | Value | Description |
---|---|---|
encodingASCII | &h0600 |
ASCII encoding. |
encodingBinary | &hFFFF |
No encoding. |
encodingLatin1 | &h0201 |
ISO Latin 1 encoding. |
encodingMacRoman | 0 |
Mac Roman encoding. |
encodingUnicode | &h0100 |
Unicode UTF16 encoding. |
encodingUTF8 | &h08000100 |
UTF-8 encoding. |
encodingWindows | &h0500 |
Windows encoding. |
This class has no sub classes.
Some examples using this class:
Blog Entries
- MBS Xojo Plugins, version 23.5pr4
- News from the MBS Xojo Plugins Version 22.1
- MBS Xojo Plugins, version 22.1pr5
- MonkeyBread Software Releases the MBS Xojo Plugins in version 21.3
- MBS Xojo Plugins, version 21.3pr7
- MBS Xojo Plugins, version 21.1pr2
- MBS Xojo Plugins, version 19.2pr1
- MonkeyBread Software Releases the MBS Xojo Plugins in version 19.1
- MBS Xojo Plugins, version 19.1pr7
- MBS Xojo Plugins, version 19.1pr6
Xojo Developer Magazine
- 21.1, page 28: News from MBS Xojo Plugins, What's up with MonkeyBread Software by Stefanie Juchmes
- 17.3, page 11: News
Release notes
- Version 23.5
- Added Constructor to StringHandleMBS class taking MemoryBlock.
- Version 22.1
- Added Add method for StringHandleMBS class to add another StringHandleMBS object.
- Version 21.3
- Added Clear method to StringHandleMBS class.
- Added option to pass array and start position to FindByte function in StringHandleMBS class.
- Added UInt32Value, UInt8Value and UInt16Value to StringHandleMBS class.
- Version 21.1
- Fixed bug in Reverse method in StringHandleMBS class.
- Version 19.2
- Added 12 more methods to StringHandleMBS class.
- Version 19.1
- Added CopyMemory and InstrUTF8 to StringHandleMBS class.
- Added new methods for UTF8 to StringHandleMBS class.
- Version 17.3
- Fixed StringHandleMBS bug on Linux.
The items on this page are in the following plugins: MBS DataTypes Plugin.
StdoutMBS - StringHashSetIteratorMBS