comparison src/luan/modules/StringLuan.java @ 1505:01e38174d580

minor fix
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 14 May 2020 15:49:45 -0600
parents f5368cd8c056
children 1b397a949791
comparison
equal deleted inserted replaced
1504:f443542d8650 1505:01e38174d580
29 return i==null ? dflt : end(s,i); 29 return i==null ? dflt : end(s,i);
30 } 30 }
31 31
32 public static Integer[] unicode(String s,Integer i,Integer j) throws LuanException { 32 public static Integer[] unicode(String s,Integer i,Integer j) throws LuanException {
33 Utils.checkNotNull(s); 33 Utils.checkNotNull(s);
34 int start = start(s,i,1); 34 int start = start(s,i,0);
35 int end = end(s,j,start+1); 35 int end = end(s,j,start+1);
36 Integer[] chars = new Integer[end-start]; 36 Integer[] chars = new Integer[end-start];
37 for( int k=0; k<chars.length; k++ ) { 37 for( int k=0; k<chars.length; k++ ) {
38 chars[k] = (int)s.charAt(start+k); 38 chars[k] = (int)s.charAt(start+k);
39 } 39 }