Rydygier 1317 Posted November 19, 2014 Don't know, if a question or rather an observation... I'm writing a script working on strings, that changes them and returns changed. All is going fine except mainly one thing: _string = " "; copyToClipboard _string; diag_log format ["%1 %2 %3 x%4x",toArray _string,toArray copyFromClipboard,toArray (_string select [0]),_string]; /*return is good: "[9,10,9] [9,10,9] [9,10,9] x x"*/ but: _string = ' '; copyToClipboard _string; diag_log format ["%1 %2 %3 x%4x",toArray _string,toArray copyFromClipboard,toArray (_string select [0]),_string]; /*return: "[9,10] [9,10] [9,10] x x" - second tab vanished*/ So, it's intentional difference between "string" and 'string' or some issue? Share this post Link to post Share on other sites
badluckburt 78 Posted November 19, 2014 Hm, interesting. I know some scripting languages that handle single and double quotes differently but I don't think SQF does that. The String entry on the BIKI doesn't mention anything about it so you may have stumbled upon a bug. Share this post Link to post Share on other sites
Heeeere's johnny! 51 Posted November 19, 2014 The String entry on the BIKI doesn't mention anything about it. Now it does. ;) https://community.bistudio.com/wiki/String#Limitations Credits to Rydygier for the example. Share this post Link to post Share on other sites
badluckburt 78 Posted November 20, 2014 Good call. That convinced me to make an account for wiki-editing. Share this post Link to post Share on other sites
Tajin 349 Posted November 20, 2014 Thanks for finding this. Might prevent some headaches for people in the future. :) Share this post Link to post Share on other sites
dreadedentity 278 Posted February 10, 2015 I apologize for revisiting this old thread, but I'm here to confirm that this behavior is still happening and to offer a solution: Through use of the toString command, we can create tabs/newlines on-the-fly. toString [9] will create a tab toString [10] will create a new line Any combination can be created with this. I tested this code: copyToClipboard format ['x%2x',toString [9,10,9]]; /* correctly returns: x x */ Share this post Link to post Share on other sites