Skip to content

Commit

Permalink
[jvm] add char name lookup aliases (LF,FF,CR and NEL)
Browse files Browse the repository at this point in the history
  • Loading branch information
FROGGS committed Jul 21, 2014
1 parent 5027534 commit 908d8a0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java
Original file line number Diff line number Diff line change
Expand Up @@ -3264,6 +3264,10 @@ public static long codepointfromname(String name) {
for (char i = 0; i < Character.MAX_VALUE; i++)
if (Character.isValidCodePoint(i))
names.put(Character.getName(i), i);
names.put("LF", (char)10);
names.put("FF", (char)12);
names.put("CR", (char)13);
names.put("NEL", (char)133);
cpNameMap = names;
}
Character found = names.get(name);
Expand Down

0 comments on commit 908d8a0

Please sign in to comment.