-- Leo's gemini proxy

-- Connecting to git.skyjake.fi:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini; charset=utf-8

the_Foundation [main]


String: Added `concat` and `concatCStr` methods


6391617d507bb6fb93a15bc1bd5d236577c193ad

diff --git a/CHANGES.md b/CHANGES.md
index e2d0db1..cbf480d 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -2,7 +2,7 @@
 
 ## 1.7.1
 * PtrArray: Added `back`, `popBack`, `popFront` methods.
-* String: Added `quoteDelim` method.
+* String: Added `concat`, `concatCStr`, and `quoteDelim` methods.
 * String: Fixed issue with the `mid` method when starting position is at or past the end.
 * StringList: Implemented missing iterator `remove` and `take` methods.
 * TlsRequest: TLS 1.2 is the minimum accepted protocol version.
diff --git a/include/the_Foundation/string.h b/include/the_Foundation/string.h
index 2773b48..2f55066 100644
--- a/include/the_Foundation/string.h
+++ b/include/the_Foundation/string.h
@@ -157,6 +157,8 @@ iString *       upperLang_String    (const iString *, const char *langCode);
 iString *       lower_String        (const iString *);
 iString *       lowerLang_String    (const iString *, const char *langCode);
 iStringList *   split_String        (const iString *, const char *separator);
+iString *       concat_String       (const iString *, const iString *other);
+iString *       concatCStr_String   (const iString *, const char *other);
 iChar           first_String        (const iString *);
 iChar           last_String         (const iString *);
 iBlock *        toLocal_String      (const iString *);
diff --git a/src/string.c b/src/string.c
index 8844d7e..6b69d6e 100644
--- a/src/string.c
+++ b/src/string.c
@@ -551,6 +551,18 @@ iStringList *split_String(const iString *d, const char *separator) {
     return split_Rangecc(range, separator);
 }
 
+iString *concat_String(const iString *d, const iString *other) {
+    iString *cat = copy_String(d);
+    append_String(cat, other);
+    return cat;
+}
+
+iString *concatCStr_String(const iString *d, const char *other) {
+    iString *cat = copy_String(d);
+    appendCStr_String(cat, other);
+    return cat;
+}
+
 iString *urlEncodeExclude_String(const iString *d, const char *excluded) {
     iString *enc = maybeUrlEncodeExclude_String(d, excluded);
     return enc ? enc : copy_String(d);

-- Response ended

-- Page fetched on Sun Jun 2 10:46:54 2024