[cl-ppcre-devel] omitting initial void string in split returns

Edi Weitz edi at agharta.de
Fri Apr 13 11:58:27 UTC 2012


I don't think there is (unless you want the initial space to be a part
of the first string like "  43").  The easiest solution would be to
call something like REMOVE-IF or DELETE-IF directly afterwards.

Cheers,
Edi.

On Fri, Apr 13, 2012 at 12:03 PM, Mario Maio <mario.maio at libero.it> wrote:
> I want to parse strings of space-separated integers, and split is perfect
> except when I have vertical aligned integers. In such cases I've got one or
> more spaces at beginning of string, and the resulting list has a void string
> as 1st element:
>
> CL-USER> (cl-ppcre:split "\\s+" "   43  76  87  33   89  ")
>
> ("" "43" "76" "87" "33" "89")
>
> Is there an option to avoid such initial void string?
>
> Thanks.
>
> Mario
>
>
> _______________________________________________
> cl-ppcre-devel site list
> cl-ppcre-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/cl-ppcre-devel
>




More information about the Cl-ppcre-devel mailing list