Exemplo n.º 1
0
 @Subroutine("substring-no-properties")
 public static LispString substringNoProperties(
     LispString string, @Optional LispObject from, LispObject to) {
   int length = string.size();
   int start = Predicate.isNil(from) ? 0 : processBound(getInt(from), length);
   int end = Predicate.isNil(to) ? length : processBound(getInt(to), length);
   try {
     return string.substring(start, end, false);
   } catch (IndexOutOfBoundsException e) {
     throw new ArgumentOutOfRange(string, start, end);
   }
 }