• R/O
  • SSH
  • HTTPS

eirrepo: Commit


Commit MetaInfo

Revision103 (tree)
Time2018-05-18 06:12:34
Authorquiret

Log Message

- added global helper cplen_tozero to get a stringlength without CRT bs

Change Summary

Incremental Difference

--- common/sdk/UniChar.h (revision 102)
+++ common/sdk/UniChar.h (revision 103)
@@ -20,6 +20,21 @@
2020
2121 #include <limits>
2222
23+// Calculates the length of a string to the zero-terminator.
24+template <typename charType>
25+inline size_t cplen_tozero( const charType *chars )
26+{
27+ size_t len = 0;
28+
29+ while ( *chars != (charType)0 )
30+ {
31+ len++;
32+ chars++;
33+ }
34+
35+ return len;
36+}
37+
2338 // UNICODE CHARACTER LIBRARY TESTING.
2439 template <typename charType>
2540 struct character_env
Show on old repository browser