emacs-devel
[Top][All Lists]
Advanced

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

Re: Why (substring "abc" 0 4) does not return "abc" instead of an error?


From: Bastien
Subject: Re: Why (substring "abc" 0 4) does not return "abc" instead of an error?
Date: Mon, 16 Jul 2012 10:38:42 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (gnu/linux)

Thierry Volpiatto <address@hidden> writes:

> (let ((str "abc")
>       (ind 9999))
>   (substring str 0 (min (length str) ind)))
> =>"abc"

I know, but I guess it's more costly than

  (substring str 0 ind t)

where `t' means "fail quietly".  But I may be wrong.

-- 
 Bastien



reply via email to

[Prev in Thread] Current Thread [Next in Thread]