Platforms to show: All Mac Windows Linux Cross-Platform

GetStringsFromDataMBS(data as MemoryBlock, MinLength as Integer = 0) as string()

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method String MBS Util Plugin 16.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Looks for strings within a data block.

Looks over the bytes in the data block to see if there are useful byte sequences which could be text.
Returns an array with all text fragments found.

This function is UTF8 aware and will work well for UTF-8 encoded text fragments.

See also:

GetStringsFromDataMBS(data as ptr, size as Integer, MinLength as Integer = 0) as string()

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method String MBS Util Plugin 16.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Looks for strings within a data block.

Looks over the bytes in the data block to see if there are useful byte sequences which could be text.
Returns an array with all text fragments found.

This function is UTF8 aware and will work well for UTF-8 encoded text fragments.

See also:

GetStringsFromDataMBS(data as String, MinLength as Integer = 0) as string()

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method String MBS Util Plugin 16.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Looks for strings within a data block.
Example
dim f as FolderItem = SpecialFolder.Desktop.Child("test.txt")
dim b as BinaryStream = BinaryStream.Open(f)
dim s as string = b.Read(b.Length)
dim texts() as string = GetStringsFromDataMBS(s, 3)

Break

Looks over the bytes in the data block to see if there are useful byte sequences which could be text.
Returns an array with all text fragments found.

This function is UTF8 aware and will work well for UTF-8 encoded text fragments.

See also:

Blog Entries

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


The biggest plugin in space...