Index: libcfa/src/collections/string.cfa
===================================================================
--- libcfa/src/collections/string.cfa	(revision 96a11655e02a258c33fdb2c53b209dc8dd9db15f)
+++ libcfa/src/collections/string.cfa	(revision ed5023d1a93d52e928c7120920781fefeb7fe26b)
@@ -10,6 +10,6 @@
 // Created On       : Fri Sep 03 11:00:00 2021
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Apr  3 21:27:08 2025
-// Update Count     : 297
+// Last Modified On : Sat Apr  5 15:18:30 2025
+// Update Count     : 318
 //
 
@@ -256,5 +256,5 @@
 	if ( start < 0 ) { start += len( s ); }
 	if ( len < 0 ) { len = -len; start -= len; }
-	if ( start > len( s ) ) return (string){ "" };
+	if ( start >= len( s ) ) return (string){ "" };
 	if ( start + len > len( s ) ) len = len( s ) - start;
 	string ret = { *s.inner, start, len };
@@ -424,46 +424,56 @@
 }
 
-int find( const string & s, char search ) {
-	return find( *s.inner, search );
-}
-
-int find( const string & s, const string & search ) {
-	return find( *s.inner, *search.inner );
-}
-
-int find( const string & s, const char * search ) {
-	return find( *s.inner, search );
-}
-
-int find( const string & s, const char * search, size_t searchsize ) {
-	return find( *s.inner, search, searchsize );
-}
-
-int find( const string & s, size_t fromPos, char search ) {
-	return findFrom( *s.inner, fromPos, search );
-}
-
-int find( const string & s, size_t fromPos, const string & search ) {
-	return findFrom( *s.inner, fromPos, *search.inner );
-}
-
-int find( const string & s, size_t fromPos, const char * search ) {
-	return findFrom( *s.inner, fromPos, search );
-}
-
-int find( const string & s, size_t fromPos, const char * search, size_t searchsize ) {
-	return findFrom( *s.inner, fromPos, search, searchsize );
-}
-
-bool includes( const string & s, const string & search ) {
-	return includes( *s.inner, *search.inner );
-}
-
-bool includes( const string & s, const char * search ) {
-	return includes( *s.inner, search );
-}
-
-bool includes( const string & s, const char * search, size_t searchsize ) {
-	return includes( *s.inner, search, searchsize );
+int find( const string & s, size_t start, size_t len, const string & key, size_t kstart, size_t klen ) {
+	if ( start < 0 ) { start += len( s ); }
+	if ( len < 0 ) { len = -len; start -= len; }
+	if ( start >= len( s ) ) return 0;
+	if ( start + len > len( s ) ) len = len( s ) - start;
+
+	if ( kstart < 0 ) { kstart += len( key ); }
+	if ( klen < 0 ) { klen = -klen; kstart -= klen; }
+	if ( kstart >= len( key ) ) return 0;
+	if ( kstart + klen > len( key ) ) klen = len( key ) - kstart;
+	
+	return findFrom( *s.inner, start, *key.inner );
+}
+
+int find( const string & s, char key ) {
+	return find( *s.inner, key );
+}
+
+int find( const string & s, const string & key ) {
+	return find( *s.inner, *key.inner );
+}
+
+int find( const string & s, const char * key ) {
+	return find( *s.inner, key );
+}
+
+int find( const string & s, const char * key, size_t keysize ) {
+	return find( *s.inner, key, keysize );
+}
+
+int find( const string & s, size_t start, char key ) {
+	return findFrom( *s.inner, start, key );
+}
+
+int find( const string & s, size_t start, const char * key ) {
+	return findFrom( *s.inner, start, key );
+}
+
+int find( const string & s, size_t start, const char * key, size_t keysize ) {
+	return findFrom( *s.inner, start, key, keysize );
+}
+
+bool includes( const string & s, const string & mask ) {
+	return includes( *s.inner, *mask.inner );
+}
+
+bool includes( const string & s, const char * mask ) {
+	return includes( *s.inner, mask );
+}
+
+bool includes( const string & s, const char * mask, size_t masksize ) {
+	return includes( *s.inner, mask, masksize );
 }
 
Index: libcfa/src/collections/string.hfa
===================================================================
--- libcfa/src/collections/string.hfa	(revision 96a11655e02a258c33fdb2c53b209dc8dd9db15f)
+++ libcfa/src/collections/string.hfa	(revision ed5023d1a93d52e928c7120920781fefeb7fe26b)
@@ -10,6 +10,6 @@
 // Created On       : Fri Sep 03 11:00:00 2021
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Apr  3 21:45:53 2025
-// Update Count     : 170
+// Last Modified On : Sat Apr  5 15:16:23 2025
+// Update Count     : 180
 //
 
@@ -212,33 +212,38 @@
 bool ?<? ( const char *, const string & );
 
+// String search
+bool contains( const string & s, char ch );				// single character
+
+int find( const string & s, char key );
+static inline int ?^? ( const string & s, char key ) { return find( s, key ); }
+int find( const string & s, const char * key );
+static inline int ?^? ( const string & s, const char * key ) { return find( s, key ); }
+int find( const string & s, const string & key );
+static inline int ?^? ( const string & s, const string & key ) { return find( s, key ); }
+int find( const string & s, const char * key, size_t keysize );
+
+int find( const string & s, size_t start, char key );
+int find( const string & s, size_t start, const string & key );
+int find( const string & s, size_t start, const char * key );
+int find( const string & s, size_t start, const char * key, size_t keysize );
+
+bool includes( const string & s, const string & mask );
+bool includes( const string & s, const char * mask );
+bool includes( const string & s, const char * mask, size_t masksize );
+
+bool startsWith( const string & s, const string & prefix );
+bool startsWith( const string & s, const char * prefix );
+bool startsWith( const string & s, const char * prefix, size_t prefixsize );
+
+bool endsWith( const string & s, const string & suffix );
+bool endsWith( const string & s, const char * suffix );
+bool endsWith( const string & s, const char * suffix, size_t suffixsize );
 
 // Slicing
 string ?()( string & s, ssize_t start, ssize_t len );		// TODO const?
 string ?()( string & s, ssize_t start );
-
-// String search
-bool contains( const string & s, char ch );				// single character
-
-int find( const string & s, char search );
-int find( const string & s, const string & search );
-int find( const string & s, const char * search );
-int find( const string & s, const char * search, size_t searchsize );
-
-int find( const string & s, size_t fromPos, char search );
-int find( const string & s, size_t fromPos, const string & search );
-int find( const string & s, size_t fromPos, const char * search );
-int find( const string & s, size_t fromPos, const char * search, size_t searchsize );
-
-bool includes( const string & s, const string & search );
-bool includes( const string & s, const char * search );
-bool includes( const string & s, const char * search, size_t searchsize );
-
-bool startsWith( const string & s, const string & prefix );
-bool startsWith( const string & s, const char * prefix );
-bool startsWith( const string & s, const char * prefix, size_t prefixsize );
-
-bool endsWith( const string & s, const string & suffix );
-bool endsWith( const string & s, const char * suffix );
-bool endsWith( const string & s, const char * suffix, size_t suffixsize );
+static inline string ?()( string & s, char m ) { return s( find( s, m ), 1 )`share; }
+static inline string ?()( string & s, const char * m ) { return s( find( s, m ), len( m ) )`share; }
+static inline string ?()( string & s, const string & m ) { return s( find( s, m ), len( m ) )`share; }
 
 // Modifiers
Index: libcfa/src/collections/string_res.cfa
===================================================================
--- libcfa/src/collections/string_res.cfa	(revision 96a11655e02a258c33fdb2c53b209dc8dd9db15f)
+++ libcfa/src/collections/string_res.cfa	(revision ed5023d1a93d52e928c7120920781fefeb7fe26b)
@@ -10,6 +10,6 @@
 // Created On       : Fri Sep 03 11:00:00 2021
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Apr  1 23:29:58 2025
-// Update Count     : 91
+// Last Modified On : Sun Apr  6 07:38:02 2025
+// Update Count     : 111
 //
 
@@ -724,17 +724,6 @@
 }
 
-void ?+=?(string_res & str1, const string_res & str2) {
-	append( str1, str2.Handle.s, str2.Handle.lnth );
-}
-
-void append(string_res & str1, const string_res & str2, size_t maxlen) {
-	append( str1, str2.Handle.s, min(str2.Handle.lnth, maxlen) );
-}
-
-void ?+=?(string_res & s, char c) {
-	append( s, & c, 1 );
-}
-void ?+=?(string_res & s, const char * c) {
-	append( s, c, strlen(c) );
+void append( string_res & s, const string_res & s2, size_t maxlen ) {
+	append( s, s2.Handle.s, min( s2.Handle.lnth, maxlen ) );
 }
 
@@ -751,42 +740,9 @@
 // Comparisons
 
-int strcmp(const string_res & s1, const string_res & s2) {
-	// return 0;
-	int ans1 = memcmp(s1.Handle.s, s2.Handle.s, min(s1.Handle.lnth, s2.Handle.lnth));
-	if (ans1 != 0) return ans1;
-	return s1.Handle.lnth - s2.Handle.lnth;
-}
-
-bool ?==?(const string_res & s1, const string_res & s2) { return strcmp(s1, s2) == 0; }
-bool ?!=?(const string_res & s1, const string_res & s2) { return strcmp(s1, s2) != 0; }
-bool ?>? (const string_res & s1, const string_res & s2) { return strcmp(s1, s2) >  0; }
-bool ?>=?(const string_res & s1, const string_res & s2) { return strcmp(s1, s2) >= 0; }
-bool ?<=?(const string_res & s1, const string_res & s2) { return strcmp(s1, s2) <= 0; }
-bool ?<? (const string_res & s1, const string_res & s2) { return strcmp(s1, s2) <  0; }
-
-int strcmp (const string_res & s1, const char * s2) {
-	string_res s2x = s2;
-	return strcmp(s1, s2x);
-}
-
-bool ?==?(const string_res & s1, const char * s2) { return strcmp(s1, s2) == 0; }
-bool ?!=?(const string_res & s1, const char * s2) { return strcmp(s1, s2) != 0; }
-bool ?>? (const string_res & s1, const char * s2) { return strcmp(s1, s2) >  0; }
-bool ?>=?(const string_res & s1, const char * s2) { return strcmp(s1, s2) >= 0; }
-bool ?<=?(const string_res & s1, const char * s2) { return strcmp(s1, s2) <= 0; }
-bool ?<? (const string_res & s1, const char * s2) { return strcmp(s1, s2) <  0; }
-
-int strcmp (const char * s1, const string_res & s2) {
-	string_res s1x = s1;
-	return strcmp(s1x, s2);
-}
-
-bool ?==?(const char * s1, const string_res & s2) { return strcmp(s1, s2) == 0; }
-bool ?!=?(const char * s1, const string_res & s2) { return strcmp(s1, s2) != 0; }
-bool ?>? (const char * s1, const string_res & s2) { return strcmp(s1, s2) >  0; }
-bool ?>=?(const char * s1, const string_res & s2) { return strcmp(s1, s2) >= 0; }
-bool ?<=?(const char * s1, const string_res & s2) { return strcmp(s1, s2) <= 0; }
-bool ?<? (const char * s1, const string_res & s2) { return strcmp(s1, s2) <  0; }
-
+int strcmp$( const char * s1, size_t l1, const char * s2, size_t l2 ) {
+	int ret = memcmp( s1, s2, min( l1, l2 ) );
+	if ( ret != 0 ) return ret;
+	return l1 - l2;
+}
 
 //////////////////////////////////////////////////////////
Index: libcfa/src/collections/string_res.hfa
===================================================================
--- libcfa/src/collections/string_res.hfa	(revision 96a11655e02a258c33fdb2c53b209dc8dd9db15f)
+++ libcfa/src/collections/string_res.hfa	(revision ed5023d1a93d52e928c7120920781fefeb7fe26b)
@@ -10,6 +10,6 @@
 // Created On       : Fri Sep 03 11:00:00 2021
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Apr  1 23:24:20 2025
-// Update Count     : 62
+// Last Modified On : Sun Apr  6 07:35:44 2025
+// Update Count     : 70
 //
 
@@ -19,5 +19,5 @@
 #include <string.h>    // e.g. strlen
 
-    
+
 //######################### HandleNode #########################
 //private
@@ -26,10 +26,10 @@
 
 struct HandleNode {
-    HandleNode *flink;					// forward link
-    HandleNode *blink;					// backward link
-    VbyteHeap *ulink;                   // upward link
-
-    char *s;							// pointer to byte string
-    unsigned int lnth;					// length of byte string
+	HandleNode * flink;									// forward link
+	HandleNode * blink;									// backward link
+	VbyteHeap * ulink;									// upward link
+
+	char * s;											// pointer to byte string
+	unsigned int lnth;									// length of byte string
 }; // HandleNode
 
@@ -45,8 +45,8 @@
 // A dynamically-sized string
 struct string_res {
-    HandleNode Handle; // chars, start, end, global neighbours
-    bool shareSet_owns_ulink;
-    string_res * shareSet_prev;
-    string_res * shareSet_next;
+	HandleNode Handle; // chars, start, end, global neighbours
+	bool shareSet_owns_ulink;
+	string_res * shareSet_prev;
+	string_res * shareSet_next;
 };
 
@@ -55,5 +55,5 @@
 
 struct charclass_res {
-    string_res chars;
+	string_res chars;
 };
 
@@ -70,5 +70,5 @@
 
 // Getters
-size_t len(const string_res & s);
+size_t len( const string_res & s);
 
 // Constructors, Assignment Operators, Destructor
@@ -76,8 +76,8 @@
 void ?{}(string_res & s, const char * buffer, size_t bsize); // copy specific length from buffer
 static inline void ?{}(string_res & s, const char * rhs) { // copy from string literal (NULL-terminated)
-    (s){ rhs, strlen(rhs) };
+	(s){ rhs, strlen(rhs) };
 }
 static inline void ?{}(string_res & s, char c ) {
-    ?{}( s, &c, 1);
+	?{}( s, &c, 1);
 }
 
@@ -89,8 +89,8 @@
 void ?{}(string_res & s, const string_res & src, StrResInitMode, size_t start, size_t len );
 static inline void ?{}(string_res & s, const string_res & src, StrResInitMode mode ) {
-    ?{}( s, src, mode, 0, len(src));
+	?{}( s, src, mode, 0, len(src));
 }
 static inline void ?{}(string_res & s, const string_res & src, StrResInitMode mode, size_t maxlen ) {
-    ?{}( s, src, mode, 0, (len(src) > maxlen)?maxlen:len(src) );
+	?{}( s, src, mode, 0, (len(src) > maxlen)?maxlen:len(src) );
 }
 void ?{}( string_res & s, ssize_t rhs );
@@ -104,5 +104,5 @@
 string_res & assign(string_res & s, const char * buffer, size_t bsize); // copy specific length from buffer
 static inline string_res & ?=?(string_res & s, const char * c) {  // copy from string literal (NULL-terminated)
-    return assign(s, c, strlen(c));
+	return assign(s, c, strlen( c));
 }
 string_res & ?=?(string_res & s, const string_res & c);
@@ -172,14 +172,13 @@
 
 // Concatenation
-void ?+=?(string_res & s, const string_res & s2);
-void ?+=?(string_res & s, char c);
-void append(string_res & s, const string_res & s2, size_t maxlen);
-void ?+=?(string_res & s, const char * c);
-void append(string_res & s, const char * buffer, size_t bsize);
-
-static inline string_res & strcat(string_res & s, const string_res & s2) { s += s2; return s; }
-static inline string_res & strcat(string_res & s, const char * c) { s += c; return s; }
-static inline string_res & strncat(string_res & s, const string_res & s2, size_t maxlen) { append(s, s2, maxlen); return s; }
-static inline string_res & strncat(string_res & s, const char * buffer, size_t bsize) { append(s, buffer, bsize); return s; }
+void append( string_res & s, const char * buffer, size_t bsize );
+void append( string_res & s, const string_res & s2, size_t maxlen );
+static inline void ?+=?( string_res & s, const string_res & s2 ) { append( s, s2.Handle.s, s2.Handle.lnth ); }
+static inline void ?+=?( string_res & s, char c ) { append( s, & c, 1 ); }
+static inline void ?+=?( string_res & s, const char * c ) { append( s, c, strlen( c ) ); }
+static inline string_res & strcat( string_res & s, const string_res & s2 ) { s += s2; return s; }
+static inline string_res & strcat( string_res & s, const char * c ) { s += c; return s; }
+static inline string_res & strncat( string_res & s, const string_res & s2, size_t maxlen ) { append(s, s2, maxlen); return s; }
+static inline string_res & strncat( string_res & s, const char * buffer, size_t bsize ) { append(s, buffer, bsize); return s; }
 
 // Repetition
@@ -187,60 +186,62 @@
 
 // Character access
-void assignAt(const string_res & s, size_t index, char val);
-char ?[?](const string_res & s, size_t index); // Mike changed to ret by val from Sunjay's ref, to match Peter's
-//char codePointAt(const string_res & s, size_t index); // revisit under Unicode
+void assignAt( const string_res & s, size_t index, char val);
+char ?[?]( const string_res & s, size_t index); // Mike changed to ret by val from Sunjay's ref, to match Peter's
+//char codePointAt( const string_res & s, size_t index); // revisit under Unicode
 
 // Comparisons
-int  strcmp (const string_res &, const string_res &);
-bool ?==?(const string_res &, const string_res &);
-bool ?!=?(const string_res &, const string_res &);
-bool ?>? (const string_res &, const string_res &);
-bool ?>=?(const string_res &, const string_res &);
-bool ?<=?(const string_res &, const string_res &);
-bool ?<? (const string_res &, const string_res &);
-
-int  strcmp(const string_res &, const char *);
-bool ?==?(const string_res &, const char *);
-bool ?!=?(const string_res &, const char *);
-bool ?>? (const string_res &, const char *);
-bool ?>=?(const string_res &, const char *);
-bool ?<=?(const string_res &, const char *);
-bool ?<? (const string_res &, const char *);
-
-int  strcmp(const char *, const string_res &);
-bool ?==?(const char *, const string_res &);
-bool ?!=?(const char *, const string_res &);
-bool ?>? (const char *, const string_res &);
-bool ?>=?(const char *, const string_res &);
-bool ?<=?(const char *, const string_res &);
-bool ?<? (const char *, const string_res &);
+int strcmp$( const char * s1, size_t l1, const char * s2, size_t l2 );
+
+static inline int strcmp( const string_res & s1, const string_res & s2 ) { return strcmp$( s1.Handle.s, s1.Handle.lnth, s2.Handle.s, s2.Handle.lnth ); }
+static inline bool ?==?( const string_res & s1, const string_res & s2 ) { return strcmp( s1, s2 ) == 0; }
+static inline bool ?!=?( const string_res & s1, const string_res & s2 ) { return strcmp( s1, s2 ) != 0; }
+static inline bool ?>? ( const string_res & s1, const string_res & s2 ) { return strcmp( s1, s2 ) >  0; }
+static inline bool ?>=?( const string_res & s1, const string_res & s2 ) { return strcmp( s1, s2 ) >= 0; }
+static inline bool ?<=?( const string_res & s1, const string_res & s2 ) { return strcmp( s1, s2 ) <= 0; }
+static inline bool ?<? ( const string_res & s1, const string_res & s2 ) { return strcmp( s1, s2 ) <  0; }
+
+static inline int strcmp( const string_res & s1, const char * s2 ) { return strcmp$( s1.Handle.s, s1.Handle.lnth, s2, strlen( s2 ) ); }
+static inline bool ?==?( const string_res & s1, const char * s2 ) { return strcmp( s1, s2 ) == 0; }
+static inline bool ?!=?( const string_res & s1, const char * s2 ) { return strcmp( s1, s2 ) != 0; }
+static inline bool ?>? ( const string_res & s1, const char * s2 ) { return strcmp( s1, s2 ) >  0; }
+static inline bool ?>=?( const string_res & s1, const char * s2 ) { return strcmp( s1, s2 ) >= 0; }
+static inline bool ?<=?( const string_res & s1, const char * s2 ) { return strcmp( s1, s2 ) <= 0; }
+static inline bool ?<? ( const string_res & s1, const char * s2 ) { return strcmp( s1, s2 ) <  0; }
+
+static inline int strcmp( const char * s1, const string_res & s2 ) { return strcmp$( s1, strlen( s1 ), s2.Handle.s, s2.Handle.lnth ); }
+static inline bool ?==?( const char * s1, const string_res & s2 ) { return strcmp( s1, s2 ) == 0; }
+static inline bool ?!=?( const char * s1, const string_res & s2 ) { return strcmp( s1, s2 ) != 0; }
+static inline bool ?>? ( const char * s1, const string_res & s2 ) { return strcmp( s1, s2 ) >  0; }
+static inline bool ?>=?( const char * s1, const string_res & s2 ) { return strcmp( s1, s2 ) >= 0; }
+static inline bool ?<=?( const char * s1, const string_res & s2 ) { return strcmp( s1, s2 ) <= 0; }
+static inline bool ?<? ( const char * s1, const string_res & s2 ) { return strcmp( s1, s2 ) <  0; }
 
 // String search
-bool contains(const string_res & s, char ch); // single character
-
-int find(const string_res & s, char search);
-int find(const string_res & s, const string_res & search);
-int find(const string_res & s, const char * search);
-int find(const string_res & s, const char * search, size_t searchsize);
-
-int findFrom(const string_res & s, size_t fromPos, char search);
-int findFrom(const string_res & s, size_t fromPos, const string_res & search);
-int findFrom(const string_res & s, size_t fromPos, const char * search);
-int findFrom(const string_res & s, size_t fromPos, const char * search, size_t searchsize);
-
-bool includes(const string_res & s, const string_res & search);
-bool includes(const string_res & s, const char * search);
-bool includes(const string_res & s, const char * search, size_t searchsize);
-
-bool startsWith(const string_res & s, const string_res & prefix);
-bool startsWith(const string_res & s, const char * prefix);
-bool startsWith(const string_res & s, const char * prefix, size_t prefixsize);
-
-bool endsWith(const string_res & s, const string_res & suffix);
-bool endsWith(const string_res & s, const char * suffix);
-bool endsWith(const string_res & s, const char * suffix, size_t suffixsize);
-
-int include(const string_res & s, const charclass_res & mask);
-int exclude(const string_res & s, const charclass_res & mask);
+bool contains( const string_res & s, char ch); // single character
+
+int find( const string_res & s, char search);
+int find( const string_res & s, const string_res & search);
+int find( const string_res & s, const char * search);
+int find( const string_res & s, const char * search, size_t searchsize);
+
+int findFrom( const string_res & s, size_t fromPos, char search);
+int findFrom( const string_res & s, size_t fromPos, const string_res & search);
+int findFrom( const string_res & s, size_t fromPos, const char * search);
+int findFrom( const string_res & s, size_t fromPos, const char * search, size_t searchsize);
+
+bool includes( const string_res & s, const string_res & search);
+bool includes( const string_res & s, const char * search);
+bool includes( const string_res & s, const char * search, size_t searchsize);
+
+bool startsWith( const string_res & s, const string_res & prefix);
+bool startsWith( const string_res & s, const char * prefix);
+bool startsWith( const string_res & s, const char * prefix, size_t prefixsize);
+
+bool endsWith( const string_res & s, const string_res & suffix);
+bool endsWith( const string_res & s, const char * suffix);
+bool endsWith( const string_res & s, const char * suffix, size_t suffixsize);
+
+int include( const string_res & s, const charclass_res & mask);
+int exclude( const string_res & s, const charclass_res & mask);
 
 // Modifiers
