Files
@ 80d1f8f90fed
Branch filter:
Location: libtransport.git/backends/twitter/rapidjson/internal/strfunc.h - annotation
80d1f8f90fed
656 B
text/plain
Libtransport: Disconnect from room when user is connected using multiple resources and he just disconnects one of them without sending unavailable presences to the rooms
ebc2c0d45ad9 ebc2c0d45ad9 ebc2c0d45ad9 ebc2c0d45ad9 ebc2c0d45ad9 ebc2c0d45ad9 ebc2c0d45ad9 ebc2c0d45ad9 ebc2c0d45ad9 ebc2c0d45ad9 ebc2c0d45ad9 ebc2c0d45ad9 ebc2c0d45ad9 ebc2c0d45ad9 ebc2c0d45ad9 ebc2c0d45ad9 ebc2c0d45ad9 ebc2c0d45ad9 ebc2c0d45ad9 ebc2c0d45ad9 ebc2c0d45ad9 ebc2c0d45ad9 ebc2c0d45ad9 ebc2c0d45ad9 | #ifndef RAPIDJSON_INTERNAL_STRFUNC_H_
#define RAPIDJSON_INTERNAL_STRFUNC_H_
namespace rapidjson {
namespace internal {
//! Custom strlen() which works on different character types.
/*! \tparam Ch Character type (e.g. char, wchar_t, short)
\param s Null-terminated input string.
\return Number of characters in the string.
\note This has the same semantics as strlen(), the return value is not number of Unicode codepoints.
*/
template <typename Ch>
inline SizeType StrLen(const Ch* s) {
const Ch* p = s;
while (*p != '\0')
++p;
return SizeType(p - s);
}
} // namespace internal
} // namespace rapidjson
#endif // RAPIDJSON_INTERNAL_STRFUNC_H_
|