substr expression tip

   2208   0   0
User Avatar
Member
2624 posts
Joined: 8月 2006
Offline
Hi
string substr (string s, float start, float length)
Returns a substring of a string.

Using this expression you can evaluate the name of string and extract part of it ie

echo `substr(“my_string”, 3, 6)`
= string

Very handy when you want to write data out using a structure. but suppose other out nodes are not named as above. Mark on the list gave a simple answer for the float length just use a large number ! That way no matter the node name it will get automatically extracted out.

ie $HIP/`substr(opinput(“.”,0),4,10000)`.$F.bgeo

Rob

Attachments:
substring_example.hip (41.5 KB)

Gone fishing
  • Quick Links