Kondo KRS ICS Servos icon Kondo KRS ICS Servos Control Kondo KRS ICS2/3.5 servos via EZ-B UART; experimental, untested. Supports chaining, virtual servo ports, Release() and Servo() commands. Try it →
Asked — Edited
Using Substring With An Array

Using Substring With An Array

Again I cannot see what I am doing wrong. Is this another bug or am I using the array incorrectly? This works


DefineArray($TestArray,2)
$SearchString = "aaaa"
$TestArray[1] = "<aaaa><bbbb><cccc>"

if($SearchString = SubString($TestArray[1],1,4))

Print("Correct")

endif

This Dont


if($SearchString = SubString($TestArray[1],1,IndexOf($TestArray[1],"><")))

ARC Pro

Upgrade to ARC Pro

Unleash your robot's full potential with the cutting-edge features and intuitive programming offered by Synthiam ARC Pro.

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#9  

Okay - i fixed it for next release. There was a goof in the regex

User-inserted image

Author Avatar
PRO
USA
#10  

Thank you again DJ. My son tells me to start using JavaScript also, but I love using EZ-Script it is so EZ and powerful.

Thank you also ptp