Jump to content
Sign in to follow this  
alleycat

How to remove " from a string?

Recommended Posts

private["_string","_quoteUnicode","_newString"];

_string = _this select 0;
_quoteUnicode = ((toArray('"')) select 0);

_stringArr = toArray(_string);

for [{_i = 0},{_i < count _stringArr},{_i = _i + 1}] do
{
if ((_stringArr select _i) == _quoteUnicode) then
{
	_stringArr set [_i, <unicode num>];
};
};

_newString = toString(_stringArr);
_newString

Or

_newString = [_string, '"'] call CBA_fnc_replace;

Should work.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×