@Test public void endsWith() { assertTrue(empty.endsWith(empty)); assertTrue(fromString("hello").endsWith(fromString("ello"))); assertFalse(fromString("hello").endsWith(fromString("ellov"))); assertFalse(fromString("hello").endsWith(fromString("hhhello"))); assertTrue(fromString("大千世界").endsWith(fromString("世界"))); assertFalse(fromString("大千世界").endsWith(fromString("世"))); assertFalse(fromString("数据砖头").endsWith(fromString("我的数据砖头"))); }
public boolean endsWith(final BinaryString suffix) { ensureMaterialized(); suffix.ensureMaterialized(); return matchAt(suffix, sizeInBytes - suffix.sizeInBytes); }
BinaryString extends LazyBinaryFormat<String> implements Comparable<BinaryString> { public boolean endsWith(final BinaryString suffix) { ensureMaterialized(); suffix.ensureMaterialized(); return matchAt(suffix, sizeInBytes - suffix.sizeInBytes); } }
BinaryString extends LazyBinaryFormat<String> implements Comparable<BinaryString> { public boolean endsWith(final BinaryString suffix) { ensureMaterialized(); suffix.ensureMaterialized(); return matchAt(suffix, sizeInBytes - suffix.sizeInBytes); } BinaryString(); private  BinaryString(MemorySegment[] segments, int offset, int sizeInBytes); private  BinaryString(String javaObject); private  BinaryString(MemorySegment[] segments, int offset, int sizeInBytes, String javaObject); }
BinaryString extends LazyBinaryFormat<String> implements Comparable<BinaryString> { public boolean endsWith(final BinaryString suffix) { ensureMaterialized(); suffix.ensureMaterialized(); return matchAt(suffix, sizeInBytes - suffix.sizeInBytes); } BinaryString(); private  BinaryString(MemorySegment[] segments, int offset, int sizeInBytes); private  BinaryString(String javaObject); private  BinaryString(MemorySegment[] segments, int offset, int sizeInBytes, String javaObject); static BinaryString fromAddress(
			MemorySegment[] segments, int offset, int numBytes); static BinaryString fromString(String str); static BinaryString fromBytes(byte[] bytes); static BinaryString fromBytes(byte[] bytes, int offset, int numBytes); static BinaryString blankString(int length); int numChars(); byte byteAt(int index); byte[] getBytes(); @Override boolean equals(Object o); @Override String toString(); @Override void materialize(); BinaryString copy(); @Override int compareTo(@Nonnull BinaryString other); BinaryString substring(int beginIndex, int endIndex); boolean contains(final BinaryString s); boolean startsWith(final BinaryString prefix); boolean endsWith(final BinaryString suffix); BinaryString trim(); int indexOf(BinaryString str, int fromIndex); BinaryString toUpperCase(); BinaryString toLowerCase(); }
BinaryString extends LazyBinaryFormat<String> implements Comparable<BinaryString> { public boolean endsWith(final BinaryString suffix) { ensureMaterialized(); suffix.ensureMaterialized(); return matchAt(suffix, sizeInBytes - suffix.sizeInBytes); } BinaryString(); private  BinaryString(MemorySegment[] segments, int offset, int sizeInBytes); private  BinaryString(String javaObject); private  BinaryString(MemorySegment[] segments, int offset, int sizeInBytes, String javaObject); static BinaryString fromAddress(
			MemorySegment[] segments, int offset, int numBytes); static BinaryString fromString(String str); static BinaryString fromBytes(byte[] bytes); static BinaryString fromBytes(byte[] bytes, int offset, int numBytes); static BinaryString blankString(int length); int numChars(); byte byteAt(int index); byte[] getBytes(); @Override boolean equals(Object o); @Override String toString(); @Override void materialize(); BinaryString copy(); @Override int compareTo(@Nonnull BinaryString other); BinaryString substring(int beginIndex, int endIndex); boolean contains(final BinaryString s); boolean startsWith(final BinaryString prefix); boolean endsWith(final BinaryString suffix); BinaryString trim(); int indexOf(BinaryString str, int fromIndex); BinaryString toUpperCase(); BinaryString toLowerCase(); static final BinaryString EMPTY_UTF8; }