Announcement

Collapse
No announcement yet.

strlen() vs str_Length()?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 4DSysFan
    replied


    Thanks Dave......

    Leave a comment:


  • meldavia
    replied


    yes correct,


    Originally, Picaso was pretty much the same as Goldelox and had no ability to deal with strings on non-word boundaries unless you created you own functions to do the shifting etc.

    When the string classes were introduced, byte (or char) addresses needed to be effectively double to get access to non aligned bytes in the variable word space.

    All of the str_??? functions require the doubling of the actual address (which is provided bt the str_Ptr function).

    so, in summary, strlen is the legacy string length function that is for word aligned strings,

    and str_Length is part of the (later added) string class functions.

    Leave a comment:


  • 4DSysFan
    replied


    Any clarification on this?

    Leave a comment:


  • 4DSysFan
    started a topic strlen() vs str_Length()?

    strlen() vs str_Length()?

    Hello,
    What are the differences between strlen() and str_Length()?
    From my testing, it appears that str_Length() requires a string pointer, while strlen() accepts a standard (word) pointer.
    I guess I would use str_Length() if I wanted to set the start location at some arbitrary (non-word-aligned) location in memory, and search for the 0 terminator from that point on?
Working...
X