Hi. Im working on a text-based "game" that uses strings to generate maps. So I need to split these strings into bits that i can work with, but somehow the .split method kills the white space in my string. How can I get around this? Of course I can force my way round by doing it all with characters instead, but it would be a lot easier and probably less computing intensive to get the .split to work. Here is a sample of what I do:
String map1 = "########|# #. #|# $# #|# # @##|# # $##|# .##|########";
String handleMap[] = map1.split("|");
(fantastic, even the forum kills my white space:P There are equal amounts of characters inbetween the "|". So there is really 8 characters inbetween all the "|".)
Thanks for the help