[aXSL-commit] SF.net SVN: axsl:[2994] trunk/axsl/axsl-primitive/src /main/java/org/axsl/primitive/s
An API for XSL-FO.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2026-03-26 12:51:49
|
Revision: 2994
http://sourceforge.net/p/axsl/code/2994
Author: victormote
Date: 2026-03-26 12:51:46 +0000 (Thu, 26 Mar 2026)
Log Message:
-----------
Add startsWith() method to prevent unnecessary subsetting of byte sequences.
Modified Paths:
--------------
trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/ByteSequencePlus.java
Modified: trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/ByteSequencePlus.java
===================================================================
--- trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/ByteSequencePlus.java 2026-03-25 19:14:13 UTC (rev 2993)
+++ trunk/axsl/axsl-primitive/src/main/java/org/axsl/primitive/sequence/ByteSequencePlus.java 2026-03-26 12:51:46 UTC (rev 2994)
@@ -333,6 +333,16 @@
*/
int lastIndexOf(ByteSequence sequence, int fromIndex);
+ /**
+ * Tests if the subsequence of this sequence, beginning at a specified index, starts with the specified prefix.
+ * @param prefix The prefix.
+ * @param offset The index to the first byte in this sequence to be tested.
+ * @return {@code true} if and only if the sequence represented by {@code prefix} is a prefix of the subsequence of
+ * this object, starting at index {@code offset}.
+ * Also returns false if {@code offset} is negative or greater than the length of this object.
+ * @see java.lang.String#startsWith(String, int)
+ */
+ boolean startsWith(ByteSequence prefix, int offset);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|