Re: String Reverse

From: Solerman Kaplon (solerman_at_wonder.com.br)
Date: 08/13/04


Date: Fri, 13 Aug 2004 12:03:03 -0300

Hi,

John O'Harrow wrote:
> Since Ansistrings can contain null characters within the string, the test
> "while PSrc^ <> #0" cannot be used. You must use the actual string length.

What happens if you cast such a string to a PChar? What delphi does with
the #0 that supposedly should have terminatted the string? Just curious,
I've seen some of the fastcode functions using the integer prior to the
string beggining to determine the string length (when the string isn't
''). Thanks for reading

Solerman



Relevant Pages

  • Re: Porting up to VC++ 2005
    ... Since you are dealing with strings that contain file names, ... characters, but that's a different question to be handled in a different way. ... done, which should be unnecessary, it should be an LPTSTR cast, which ... It only applies to string and ...
    (microsoft.public.vc.mfc)
  • Re: Prothon should not borrow Python strings!
    ... """It does not make sense to have a string without knowing what encoding ... same cul de sac as Python. ... Prothon_String_As_ASCII // raises error if there are high characters ... Python's split between byte strings and Unicode strings is ...
    (comp.lang.python)
  • Re: Letter to US Sen. Byron Dorgan re unpaid overtime
    ... put them in stupid places. ... Programming is difficult (as you must surely appreciate, ... > strings will be in the range 1...1000 characters. ... impose an artificially small limit on string length." ...
    (comp.programming)
  • Re: Byte Array to String
    ... retrieved text will mismatch the original characters. ... encoding the characters. ... Dim strFileData as String ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: A note on personal corruption as a result of using C
    ... impossible to write effective string validation routines by definition ... (Note that a string literal may contain embedded null characters; ... without resorting to abusive language. ... In practice, programmers typically use "struct" ...
    (comp.programming)