# \- String Tools -

**URL:** <https://racket.discourse.group/t/string-tools/4121>\
**Category:** Show & Tell\
**Tags:** string\
**Created:** [February 22, 2026, 5:40pm UTC](https://racket.discourse.group/t/string-tools/4121 "2026-02-22T17:40:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![soegaard](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/soegaard/32/19_2.png) [@soegaard](https://racket.discourse.group/u/soegaard)\
**Post date:** [February 22, 2026, 5:40pm UTC](https://racket.discourse.group/t/string-tools/4121/1 "2026-02-22T17:40:23Z")

</div>

Hi All,

I have put together a new string library.

Comments are welcome.

> **[String Tools](https://docs.racket-lang.org/string-tools/)**

---

<div class="post-metadata">

**Author:** ![al\_shopov](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@al\_shopov](https://racket.discourse.group/u/al_shopov)\
**Post date:** [February 22, 2026, 8:45pm UTC](https://racket.discourse.group/t/string-tools/4121/2 "2026-02-22T20:45:41Z")

</div>

Things you may consider:

- You may explicitly state that ASCII is 7 bit code point one, not extended ASCII. Perhaps in Scheme land ASCII predominantly means 7 bit one.
- string-{plural,singular}ize - these are not general string functions. They are at least partially language aware and may be in a different package. Since you only cover `s` plurals this clearly leaves woman-\>women outside. But you can give an example whether it covers wife-\>wives.
- The -left/right suffixes strongly indicate left to right writing systems. -start/end are more neutral
- You mention SRFI-13 but if I am reading [https://srfi.schemers.org/srfi-13/srfi-13.html#NamingConventions](https://srfi.schemers.org/srfi-13/srfi-13.html#NamingConventions) correctly:  
string-trim-left should be just string-trim

All these can be called nits.

Kind regards:  
al\_shopov

На нд, 22.02.2026 г. в 18:50 Jens Axel Søgaard \<[notifications@racket.discoursemail.com](mailto:notifications@racket.discoursemail.com)\> написа:

---

<div class="post-metadata">

**Author:** ![soegaard](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/soegaard/32/19_2.png) [@soegaard](https://racket.discourse.group/u/soegaard)\
**Post date:** [February 23, 2026, 10:28am UTC](https://racket.discourse.group/t/string-tools/4121/3 "2026-02-23T10:28:43Z")

</div>

Hi Al,

Thanks for the feedback!

> - You may explicitly state that ASCII is 7 bit code point one, not extended ASCII. Perhaps in Scheme land ASCII predominantly means 7 bit one.

I looked it up. As I understand it "ASCII" is used for 7 bit and "extended ASCII" is used for 8 bit.

> - string-{plural,singular}ize - these are not general string functions. They are at least partially language aware and may be in a different package. Since you only cover `s` plurals this clearly leaves woman-\>women outside. But you can give an example whether it covers wife-\>wives.

These are indeed simplistic and restricted to English.  
Are they too simple to be useful?

> - The -left/right suffixes strongly indicate left to right writing systems. -start/end are more neutral

Here I am attempting to use what's known from `racket/string` and srfi 13 which both use left/right.

> - You mention SRFI-13 but if I am reading [SRFI 13: String Libraries](https://srfi.schemers.org/srfi-13/srfi-13.html#NamingConventions) correctly:  
> string-trim-left should be just string-trim

I am following the lead of `racket/string` here. It has a `string-trim` (so I can't use the same name) that defaults to trimming from both sides. The keywords for one side trimming is `#:left` and `#:right`. So the three names I choose are: `string-trim-both`, `string-trim-left` and `string-trim-right`.

So what do people think, should I remove `string-{plural,singular}ize` ?
