Trimming (computer programming): Difference between revisions

Content deleted Content added
Monkbot (talk | contribs)
m Task 18 (cosmetic): eval 2 templates: del empty params (1×); hyphenate params (2×);
Tags: Reverted Mobile edit Mobile web edit
Line 15:
===Left or right trimming===
 
The most popular variants of the trim function strip only the beginning or end of the string. Typically named '''ltrim''' and '''rtrim''' respectively, or in the case of Python: '''lstrip''' and '''rstrip'''<ref>IOFLOOD Python Strip[https://ioflood.com/blog/python-strip/#Exploring_Alternatives_lstrip_and_rstrip_Methods]</ref>. C# uses '''TrimStart''' and '''TrimEnd''', and Common Lisp '''string-left-trim''' and '''string-right-trim'''. Pascal and Java do not have these variants built-in, although [[Object Pascal]] (Delphi) has '''TrimLeft''' and '''TrimRight''' functions.<ref>{{cite web|url=http://www.freepascal.org/docs-html/rtl/sysutils/trim.html |title=Trim |publisher=Freepascal.org |date=2013-02-02 |access-date=2013-08-24}}</ref>
 
===Whitespace character list parameterization===