AliMag 0 Posted July 22, 2009 Hi, Is there any commands related to string manipulation? Like finding if a word is in a sentence... I remember that there was none in OFP and I'm hoping that some were included in Arma 2. This is much needed. Thanks in advance Cheers Share this post Link to post Share on other sites
kylania 568 Posted July 22, 2009 http://community.bistudio.com/wiki/String There's also a ton more in the new BIS Functions thing. Use this to look up the string functions from the new library. Share this post Link to post Share on other sites
AliMag 0 Posted July 22, 2009 Hi, Thanks for the quick reply. Unfortunately nothing as really change from OFP. You can concatenate 2 strings together but cannot find/extract part of a string. It would be nice, for example, to be able to find "_SD_" in a string of ammo to know if it silenced or not. Maybe in a future patch... Thanks again Cheers Share this post Link to post Share on other sites
Tajin 349 Posted July 22, 2009 (edited) You could probably check the config of that ammo to see if it's silenced. Also, it's abolutely possible to search a string, you'll just have to make a function for it youself. Have a look at the http://www.arma2.com/comref/full.html#toArrayString command. You could use that to split an string into an array of words and use the "find" command on it. Or in case of the ammo you could rather easily check only the last 2 letters. Aside from that, you could use kronzkys string-functions. http://kronzky.info/snippets/strings/index.htm They may not be optimized for ArmA2, but should still work nicely. Edited July 22, 2009 by Tajin Share this post Link to post Share on other sites
cuel 25 Posted October 8, 2013 snip, sorry for bump Share this post Link to post Share on other sites