You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns the length, in characters, of the specified string. The resulting value is only valid as long as no call is made
to strpool_init, strpool_term, strpool_defrag or strpool_discard. It is therefor recommended to never store the
value, and always grab it fresh by another call to strpool_length when it is needed. strpool_length is a very fast
function to call - it does little more than an array lookup. If handle is invalid, strpool_length returns 0.
Why would the length not stay valid even after a call to strpool_defrag()? The string still exists, it's just that its location in memory may have changed. So is the documentation accurate?
Another nitpick, wouldn't it be better to say that this returns the length in bytes, not characters? I don't think strpool is doing any kind of UTF8 decoding.
The text was updated successfully, but these errors were encountered:
The documentation for strpool_length() says this:
Why would the length not stay valid even after a call to strpool_defrag()? The string still exists, it's just that its location in memory may have changed. So is the documentation accurate?
Another nitpick, wouldn't it be better to say that this returns the length in bytes, not characters? I don't think strpool is doing any kind of UTF8 decoding.
The text was updated successfully, but these errors were encountered: