[fpc-pascal] Empty string

Damien Gerard milipili at shikami.org
Fri Mar 7 14:35:20 CET 2008


Le Mar 3, 2008 à 5:22 PM, ik a écrit :

> Doesn't FillChar/Word/Byte works for you ?
>

I don't think any of them made my purpose.

> Ido
>
> On Mon, Mar 3, 2008 at 6:16 PM, Damien Gerard <milipili at shikami.org>  
> wrote:
>>
>> In any programs, a lot of tests on empty strings are made.
>> The following made the work :
>> if Length(s) <> 0 then ...
>> or
>> if s <> '' then ...
>>
>> In a lot of cases, the real length is no needed, just to know if the
>> string is empty or not.
>> I am mainly using UTF8String so strings with leading zero.
>> Just with the first char we can know if the string is empty or not.
>>
>> Is there a function of this kind that I don't know already exist ?
>> Would it be possible to implement such a function (may be a stupid
>> idea for an unknown reason) ?
>> Can this function be directly done in FPC ?
>>
>> Regards.
>>
>>
>> --
>> Damien Gerard
>> milipili at shikami.org
>>
>> "Intelligence is 10 million rules."
>>    -- Douglas Lenat
>>
>>
>>
>>
>>
>> _______________________________________________
>> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>>
>
>
>
> -- 
> http://ik.homelinux.org/
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal



--
Damien Gerard
milipili at shikami.org

"Intelligence is 10 million rules."
    -- Douglas Lenat








More information about the fpc-pascal mailing list