lua-users home
lua-l archive

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


On Mon, Jan 18, 2010 at 9:28 PM, Ted Unangst wrote:
> On Mon, Jan 18, 2010 at 8:54 PM, David Manura wrote:
>> call it string.subst.  I think most programmers would immediately
>> guess what string.subst is, except maybe the part where it takes a
>> pattern and function rather than plain strings.
>
> subst is short for substring right? :)

Oh, true :)  Usually, when languages want to abbreviate substring near
the 't' they do so after the 'r': substr [1]

Looking again, it would be more common just to name it "replace" [2].

[1] http://en.wikipedia.org/wiki/Comparison_of_programming_languages_%28string_functions%29#substring
[2] http://en.wikipedia.org/wiki/Comparison_of_programming_languages_%28string_functions%29#replace