public int getNameToBackrefNumber(String name) { try { byte[] bytes = name.getBytes(); return pattern.nameToBackrefNumber(bytes, 0, bytes.length, regs); } catch (JOniException je) { throw getRuntime().newIndexError(je.getMessage()); } }
private int nameToBackrefNumber(RubyString str) { ByteList value = str.getByteList(); try { return pattern.nameToBackrefNumber( value.getUnsafeBytes(), value.getBegin(), value.getBegin() + value.getRealSize(), regs); } catch (JOniException je) { throw getRuntime().newIndexError(je.getMessage()); } }