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: Lars Ingebrigtsen
Subject: Re: master 87e422f: Beef up the Emacs string utility set a bit
Date: Mon, 21 Dec 2020 19:44:19 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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.

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...

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.

s-pad-left (len padding s)
s-pad-right (len padding s)

Hm, I thought Emacs had these, but now I can't find them...  OK, I'll
add them.

s-shared-start (s1 s2)
s-shared-end (s1 s2)

I don't see the utility.

s-repeat (num s)

This neither.

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.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




reply via email to

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