Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3021

return string length

$
0
0
Today we have run into a little problem, too tiny for me to have paid my attention to
PHP Code:

int processString(xxx)
{
   
//do something
   
return non-null terminated string length


to make the function work better we change its internals

PHP Code:

int processString(xxx)
{
   
//do something
   
return null terminated string length


This phenonmenon can be observed by use of mutibyte to wide char conversions, string copy , concatenation functions of MS etc

Should I minus one in the return value of the second function to match both versions ? Thank you.

Viewing all articles
Browse latest Browse all 3021

Trending Articles