HP Forums

Full Version: operates the extraction of strings as []
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Phython operates the extraction of strings as subscripts [], This option PRIME facilitates the manipulation of string, that they are treated as arrays

HPPrime
Syntax: MID(string, position, [n])

Extracts n characters from string starting at position. If n is not specified, then MID extracts the remainder of the string from position.

Example:
MID("MOMOGUMBO",3,5) returns "MOGUM"
MID("PUDGE",4) returns "GE"

Python

´abc´[1] retorna 'b', because Python strings are handled from position 0
´abcdef´[0:2] retorna 'ab', the operator: inside the container [] is TO, as does also MATLAB
Reference URL's