[racket] Are There More String Functions?

From: Cristian Esquivias (cristian.esquivias at gmail.com)
Date: Thu Apr 12 01:25:04 EDT 2012

Hi Erik,

Thanks for the library. Should I be calling (require srfi/13) or
import only the functions I want? That is, can I use a mix of the
built-in Racket string functions and srfi/13 functions, or will I have
to migrate completely to the srfi/13 functions?

- Cristian

On Wed, Apr 11, 2012 at 10:06 PM, Erik Silkensen
<eriksilkensen at gmail.com> wrote:
> Hi Cristian,
>
> Check out SRFI 13: http://docs.racket-lang.org/srfi-std/srfi-13.html
>
> You can load it in Racket with (require srfi/13)
>
> -- Erik
>
> On Apr 11, 2012, at 10:57 PM, Cristian Esquivias 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
>


Posted on the users mailing list.