[fdo-dev] Why use wcslen on FdoStringP objects
mateusz at loskot.net
Mon Aug 14 17:18:45 EDT 2006
Brent Robinson wrote:
> I'd recommend using GetLength().
OK. So, I'll stick to your suggestion.
> Currently, it doesn't matter, since GetLength() simply calls
> wcslen(), but there's always the chance that the GetLength()
> implementation might change in the future.
That's why I'm asking this question.
I assume there must be a reason behind introducing GetLength().
I know that now semantic of both is the same, but this is
implementation-based assumption, but I'm dealing with
interfaces and contracts.
> I'm not sure why we have so many direct calls to wcslen. My guess is
> that developers were accustomed to calling wcslen() directly and
> continued to do so after FdoString became available. Another
> possibility is that some variables started out as GisString* and were
> later changed to FdoString.
More information about the Fdo-internals