Announcement

Collapse
No announcement yet.

strlen() vs str_Length()?

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

  • 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?
    _______________
    Best Regards,
    Howard

  • #2


    Any clarification on this?
    _______________
    Best Regards,
    Howard

    Comment


    • #3


      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.
      Regards,
      Dave

      Comment


      • #4


        Thanks Dave......
        _______________
        Best Regards,
        Howard

        Comment

        Working...
        X