Split a string into a list--help needed
Posted: Fri Jul 02, 2021 6:03 pm
I want to take a numeric value such as -9.472, convert it to a string (OK, I can do that), and then convert the string into a list:
my_list, which equals [ "-", "9", ".", and so on. The individual characters will get used on a display. I found the statement below in the online documentation:
String.split(separator: str, limit: number): List[str]
But the "explanation" doesn't include a concrete example of how to use this statement. Can someone help, please? Thanks.
Also, I could not find information about how to interpret the statement above. It might help to have an introduction to the docs that describes this syntax. Cheers. --Jon
my_list, which equals [ "-", "9", ".", and so on. The individual characters will get used on a display. I found the statement below in the online documentation:
String.split(separator: str, limit: number): List[str]
But the "explanation" doesn't include a concrete example of how to use this statement. Can someone help, please? Thanks.
Also, I could not find information about how to interpret the statement above. It might help to have an introduction to the docs that describes this syntax. Cheers. --Jon