Ali Ahmed
Ali Ahmed

Reputation: 1839

how to replace a certain value in string?

I am using Flexbuilder with sdk 3.5. I convert an int to a binary string. Now I want to replace binary value at certain index. How can I do this?

I tried following but it did not work;

binaryStr[0] = "0";

and

binaryStr[0] = '0';

Upvotes: 0

Views: 160

Answers (1)

LoremIpsum
LoremIpsum

Reputation: 4428

You could use String.split() to convert your String into an Array, then change what you want, and finally convert the resulting Array into a String with Array.join() ?

Upvotes: 1

Related Questions