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

Re: naming of string-trim, etc.

This page is part of the web mail archives of SRFI 13 from before July 7th, 2015. The new archives for SRFI 13 contain all messages, not just those from before July 7th, 2015.

This issue has come up before, and it is a sensible suggestion.
However, there's a larger consideration, which is consistency with
an established convention used in SRFI-1: 
  - left-to-right is no suffix
  - right-to-left is -right suffix
This convention is going to come up again in other SRFIs (e.g., vectors).
So let us stick firmly to it.

   From: brlewis@xxxxxxxxxxxx
   Date: Fri, 16 Jun 2000 15:53:12 -0400

   I'd like to propose a change that has no semantic effect on the SRFI,
   just renaming of string-trim, string-trim-right and string-trim-both.

   I think string-trim-both would be the most commonly-used of the three;
   it should be named string-trim.

   The string-trim-right procedure should be renamed because of the
   left-to-right language assumption.

   string-trim	       string-trim-head
   string-trim-right      string-trim-tail
   string-trim-both       string-trim

   Note that in MIT Scheme (string-trim " hi ") ==> "hi".