6
I have a string and I need to separate it into one array. However, the separator character needs to be the comma (,
), but if you have a space right after (",
") she is preserved in separation.
I’m trying to do this with split
, but I’m not getting it. Example of what I want:
string = "1,0,true,Yes, please";
I need to:
array = ["1","0","true","Yes, please"]
I don’t understand what you mean by "the ',' needs to be preserved"
– JrD
@Jrd I believe it is the comma needs to be preserved
– Luiz Augusto