Quantcast
Channel: NI TestStand topics
Viewing all articles
Browse latest Browse all 6525

Selecting specific elements of a string

$
0
0

I'm working on a program that requires a certain sequence of outputting from a string. In python, I am able to use this line to select the last 2 elements of the string to be added to the first 2 elements of the string to form the output

sl=str(z1)

sll=sl[-2:]+sl[:2]

 

Any idea how to replicate this in teststand. 

Locals.hextstr=Str(Locals.y1,"%x"), Locals.hextstr2=Str(Locals.y2,"%x"),Locals.s=Locals.hextstr+Locals.hextstr2

I need to get the last 2 elements from hexstr and then to be followed by the first 2 elements of hexstr and repeat this for hexstr2 also


Viewing all articles
Browse latest Browse all 6525

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>