|
|
|
|
|
by z92
1932 days ago
|
|
Also note that the way he fixed it, strlen only caches the last call and returns quickly on an immediate second call with the same string. Another reason why C styled null terminated strings suck. Use a class or structure and store both the string pointer and its length. I have seen other programs where strlen was gobbling up 95% of execution time. |
|