emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 87e422f: Beef up the Emacs string utility set a bit


From: Stefan Kangas
Subject: Re: master 87e422f: Beef up the Emacs string utility set a bit
Date: Mon, 21 Dec 2020 13:05:23 -0600

Lars Ingebrigtsen <larsi@gnus.org> writes:

> I've been going through
>
> https://github.com/magnars/s.el
>
> to see whether there's anything there that seems both 1) useful and 2)
> Emacs doesn't have already, but there was less than I remembered,
> really.  With the five functions I added, the rest are mostly just
> aliases for stuff we have in Emacs 28.

I had a look at GitHub to get some data, in case that helps.

> Things I wasn't sure about:
>
> s-chomp (s)
>
> Is this really useful?  Emacs is so un-line-oriented that I can't recall
> having removed newlines from a string ever...

It seems to have some real world usage, at least:

    https://github.com/search?l=Emacs+Lisp&q=s-chomp&type=Code

> s-center (len s)
>
> I can squint a bit and almost see how this would be useful, but not
> really?  I can only remember padding either to the left or right.

Not used a lot:

    https://github.com/search?l=Emacs+Lisp&p=2&q=s-center&type=Code

> s-shared-start (s1 s2)
> s-shared-end (s1 s2)
>
> I don't see the utility.

Not used a lot:

    https://github.com/search?l=Emacs+Lisp&p=2&q=s-shared-start&type=Code

> s-repeat (num s)
>
> This neither.

Seems to see some use, but not a lot:

    https://github.com/search?l=Emacs+Lisp&q=s-repeat&type=Code

> There's also a bunch of "titleize" functions that just seem to quirky.
> And the camelCase and SnakeCase functions?  Dunno, I think they're best
> left in the s.el for people that want that.

Unsure about titleize, but here we have:

    https://github.com/search?l=Emacs+Lisp&q=s-titleize&type=Code



reply via email to

[Prev in Thread] Current Thread [Next in Thread]