[fpc-pascal] Empty string

ik idokan at gmail.com
Mon Mar 3 17:22:01 CET 2008


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

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/



More information about the fpc-pascal mailing list