Platforms to show: All Mac Windows Linux Cross-Platform

InStrByteRangeMBS(target as string, find as string, StartValue as Integer, EndValue as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method String MBS Util Plugin 10.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Finds bytes or byte ranges in a string.
Example
// search for question mark or uppercase letters A to Z
MsgBox str(InStrByteRangeMBS("Hello?", "?", 65, 90)) // shows 1 as H is found.

MsgBox str(InStrByteRangeMBS("hello?", "?", 65, 90)) // shows 6 as ? is found.

You may want to make sure target and find are both in the same 8bit encoding (UTF-8, MacRoman, Windows ANSI, Latin 1, ASCII, etc. but not UTF16/UTF32).

The optional find string defines the bytes to search. This gives you a way to see whether one of those bytes is inside or to find the first byte matching a certain value.

The StartValue/EndValue parameters define ranges of values which you consider to match.

Returns 0 if nothing is found or the position of the found character.

See also:

InStrByteRangeMBS(target as string, find as string, StartValue as Integer, EndValue as Integer, StartValue2 as Integer, EndValue2 as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method String MBS Util Plugin 10.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Finds bytes or byte ranges in a string.
Example
// search for question mark or uppercase letters A to Z or numbers from 0 to 9
MsgBox str(InStrByteRangeMBS("Hello?", "?", 65, 90, 48, 57)) // shows 1 as H is found.
MsgBox str(InStrByteRangeMBS("hello?", "?", 65, 90, 48, 57)) // shows 6 as ? is found
MsgBox str(InStrByteRangeMBS("Hello 123", "?", 65, 90, 48, 57)) // shows 1 as H is found.
MsgBox str(InStrByteRangeMBS("hello 123", "?", 65, 90, 48, 57)) // shows 7 as 1 is found.

You may want to make sure target and find are both in the same 8bit encoding (UTF-8, MacRoman, Windows ANSI, Latin 1, ASCII, etc. but not UTF16/UTF32).

The optional find string defines the bytes to search. This gives you a way to see whether one of those bytes is inside or to find the first byte matching a certain value.

The StartValue/EndValue parameters define ranges of values which you consider to match.

Returns 0 if nothing is found or the position of the found character.

See also:

InStrByteRangeMBS(target as string, find as string, StartValue as Integer, EndValue as Integer, StartValue2 as Integer, EndValue2 as Integer, StartValue3 as Integer, EndValue3 as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method String MBS Util Plugin 10.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Finds bytes or byte ranges in a string.
Example
// search for question mark, low byte values, high byte values or numbers from 0 to 9
MsgBox str(InStrByteRangeMBS("Hello?", "?", 0, 31, 127, 255, 48, 57 )) // shows 6 as ? is found.
MsgBox str(InStrByteRangeMBS("123", "?", 0, 31, 127, 255, 48, 57 )) // shows 1 as 1 is found.
MsgBox str(InStrByteRangeMBS(EndOfLine.Windows, "?", 0, 31, 127, 255, 48, 57 )) // shows 1 as chr(13) is found.
MsgBox str(InStrByteRangeMBS("Hello", "?", 0, 31, 127, 255, 48, 57 )) // shows 0 as nothing is found.

You may want to make sure target and find are both in the same 8bit encoding (UTF-8, MacRoman, Windows ANSI, Latin 1, ASCII, etc. but not UTF16/UTF32).

The optional find string defines the bytes to search. This gives you a way to see whether one of those bytes is inside or to find the first byte matching a certain value.

The StartValue/EndValue parameters define ranges of values which you consider to match.

Returns 0 if nothing is found or the position of the found character.

See also:

InStrByteRangeMBS(target as string, StartValue as Integer, EndValue as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method String MBS Util Plugin 10.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Finds bytes or byte ranges in a string.
Example
// search for uppercase letters A to Z
MsgBox str(InStrByteRangeMBS("Hello?", 65, 90)) // shows 1 as H is found.

MsgBox str(InStrByteRangeMBS("hello?", 65, 90)) // shows 0 as nothing is found.

You may want to make sure target and find are both in the same 8bit encoding (UTF-8, MacRoman, Windows ANSI, Latin 1, ASCII, etc. but not UTF16/UTF32).

The optional find string defines the bytes to search. This gives you a way to see whether one of those bytes is inside or to find the first byte matching a certain value.

The StartValue/EndValue parameters define ranges of values which you consider to match.

Returns 0 if nothing is found or the position of the found character.

See also:

InStrByteRangeMBS(target as string, StartValue as Integer, EndValue as Integer, StartValue2 as Integer, EndValue2 as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method String MBS Util Plugin 10.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Finds bytes or byte ranges in a string.
Example
// search for uppercase letters A to Z or numbers from 0 to 9
MsgBox str(InStrByteRangeMBS("Hello?", 65, 90, 48, 57)) // shows 1 as H is found.
MsgBox str(InStrByteRangeMBS("hello?", 65, 90, 48, 57)) // shows 0 as nothing is found.
MsgBox str(InStrByteRangeMBS("Hello 123", 65, 90, 48, 57)) // shows 1 as H is found.
MsgBox str(InStrByteRangeMBS("hello 123", 65, 90, 48, 57)) // shows 7 as 1 is found.

You may want to make sure target and find are both in the same 8bit encoding (UTF-8, MacRoman, Windows ANSI, Latin 1, ASCII, etc. but not UTF16/UTF32).

The optional find string defines the bytes to search. This gives you a way to see whether one of those bytes is inside or to find the first byte matching a certain value.

The StartValue/EndValue parameters define ranges of values which you consider to match.

Returns 0 if nothing is found or the position of the found character.

See also:

InStrByteRangeMBS(target as string, StartValue as Integer, EndValue as Integer, StartValue2 as Integer, EndValue2 as Integer, StartValue3 as Integer, EndValue3 as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method String MBS Util Plugin 10.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Finds bytes or byte ranges in a string.
Example
// search for low byte values, high byte values or numbers from 0 to 9
MsgBox str(InStrByteRangeMBS("Hello?", 0, 31, 127, 255, 48, 57 )) // shows 0 as nothing is found.
MsgBox str(InStrByteRangeMBS("123", 0, 31, 127, 255, 48, 57 )) // shows 1 as 1 is found.
MsgBox str(InStrByteRangeMBS(EndOfLine.Windows, 0, 31, 127, 255, 48, 57 )) // shows 1 as chr(13) is found.
MsgBox str(InStrByteRangeMBS("Hello", 0, 31, 127, 255, 48, 57 )) // shows 0 as nothing is found.

You may want to make sure target and find are both in the same 8bit encoding (UTF-8, MacRoman, Windows ANSI, Latin 1, ASCII, etc. but not UTF16/UTF32).

The optional find string defines the bytes to search. This gives you a way to see whether one of those bytes is inside or to find the first byte matching a certain value.

The StartValue/EndValue parameters define ranges of values which you consider to match.

Returns 0 if nothing is found or the position of the found character.

See also:

Blog Entries

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


The biggest plugin in space...