[racket] Are There More String Functions?
truly, racket seems to do anything string-related by means of regular
expressions, like the usual string-replace one would expect being
available as simply regexp-replace.
You should learn regexes. They're not the one-and-only solution like
in Perl, but they are truly handy in string processing.
On Thu, Apr 12, 2012 at 1:57 AM, Cristian Esquivias
<cristian.esquivias at gmail.com> wrote:
> I just started getting my hands dirty with Racket on some utility
> scripts. Overall, it's been a great experience. My scripts are
> shorter, clearer and faster than the initial Python scripts I wrote
> (but that could be because they're my second time around).
>
> I did run into one constant obstacle while using Racket: the dearth of
> convenience string functions. There are plenty of functions for
> strings, but several functions that are present on other platforms
> (e.g., Python, Ruby, Java, etc.) don't seem to be part of the Racket
> standard library.
>
> Some of the functions I couldn't find but would've been useful were
> things like (in Racket-type naming):
>
> string-starts-with?
> string-ends-with?
> string-index-of
> string-replace
> string-trim
>
> I did a little google searching and most advice said to use the regex
> library (which I did), but the code isn't as clear had I used
> functions like the ones above.
>
> Do these functions exist anywhere? Is there a great PLaneT package
> that supplies these functions?
>
> Thanks,
> Cristian
> ____________________
> Racket Users list:
> http://lists.racket-lang.org/users