mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-06-09 10:29:32 +00:00
trim DATA
This commit is contained in:
parent
ca64401dde
commit
112fbc086b
|
@ -335,19 +335,18 @@ public class SubLine implements ApplesoftConstants
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TOKEN_DATA:
|
case TOKEN_DATA:
|
||||||
lineBuffer = getBuffer ();
|
for (String chunk : new String (getBuffer ()).split (","))
|
||||||
if (lineBuffer.length == 0)
|
|
||||||
break;
|
|
||||||
|
|
||||||
for (String chunk : new String (lineBuffer).split (","))
|
|
||||||
{
|
{
|
||||||
|
chunk = chunk.trim ();
|
||||||
|
if (chunk.isEmpty ())
|
||||||
|
continue;
|
||||||
b = (byte) chunk.charAt (0);
|
b = (byte) chunk.charAt (0);
|
||||||
if (Utility.isDigit (b) || b == Utility.ASCII_MINUS || b == Utility.ASCII_DOT)
|
if (Utility.isDigit (b) || b == Utility.ASCII_MINUS || b == Utility.ASCII_DOT)
|
||||||
addNumber (chunk);
|
addNumber (chunk);
|
||||||
else if (Utility.isLetter (b) || b == Utility.ASCII_QUOTE)
|
else if (Utility.isLetter (b) || b == Utility.ASCII_QUOTE)
|
||||||
stringsText.add (chunk);
|
stringsText.add (chunk);
|
||||||
else
|
else
|
||||||
System.out.println ("Unknown data: " + chunk);
|
System.out.printf ("Unknown data: [%s]%n", chunk);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user