toArray – Talk

From Bohemia Interactive Community
Jump to navigation Jump to search

I maybe am too tired, but atm I don't really see where it will help ? - Lou Montana 01:07, 23 December 2007 (CET)

You are too tired. Endless posibilities... --raedor 01:27, 23 December 2007 (CET)
The world of string handling functions has been opened with the possibility to convert from string to array (and back). You can get a substring from a string with toArray, selecting the characters you want, and back to string. You can search for a string within a string, by converting to array and comparing elements. You can trim off leading/trailing spaces, find repeating charachters, count the number of specific characters in a string, etc. etc. HitmanFF 01:42, 23 December 2007 (CET)
Ooooh yes, I was too tired :) Didn't see you could get each letter separately, it's like "string2array" request ! (just one thing overburn my head, WHY in ASCII ? Upper/Lower comparison ?) - Lou Montana 12:23, 23 December 2007 (CET)
I think ASCII and Upper/Lower comparisons cover all the basic elements for most tasks?UNN 20:38, 23 December 2007 (CET)
Well, I guess it was the simplest way! We never had to use ASCII before, but if its purpose is just for Upper/Lowercase, then, adopted ! Maybe I'll use it someday ;) - Lou Montana 02:56, 24 December 2007 (CET)
I don't think you have to use UniCode either. But if you wanted to recreate some user made functions that cover all the expected, string handling functions, found in dedicated programming languages. Then I thought, those three commands would be just enough, for Arma scripter’s to do that? UNN 20:05, 28 December 2007 (CET)