added support for '-' and '.' but both not as the first as first character

This commit is contained in:
Georg von Zengen 2014-02-27 14:14:36 +01:00
parent 27576919a4
commit 3be6eb84b9
1 changed files with 3 additions and 2 deletions

View File

@ -2063,9 +2063,10 @@ public class Sketch {
for (int i = 0; i < c.length; i++) {
if (((c[i] >= '0') && (c[i] <= '9')) ||
((c[i] >= 'a') && (c[i] <= 'z')) ||
((c[i] >= 'A') && (c[i] <= 'Z'))) {
((c[i] >= 'A') && (c[i] <= 'Z')) ||
((i > 0) && (c[i] == '-')) ||
((i > 0) && (c[i] == '.'))) {
buffer.append(c[i]);
} else {
buffer.append('_');
}