Changeset 1036 for cpp/common
- Timestamp:
- 11/30/20 03:39:11 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/common/util-string.cpp
r1025 r1036 22 22 while (*str) 23 23 { 24 if (*str >= 32 && *str < 128) 25 out += *str; 24 unsigned char ch = *str; 25 if (ch >= 32 && ch < 128) 26 out += ch; 26 27 else 27 28 { 28 if ( *str== 10) out += "\\n"; else29 if ( *str== 13) out += "\\r"; else29 if (ch == 10) out += "\\n"; else 30 if (ch == 13) out += "\\r"; else 30 31 { 31 sprintf(hex, "%X", *str);32 sprintf(hex, "%X", ch); 32 33 out += "\\x"; 33 34 out += hex;
Note: See TracChangeset
for help on using the changeset viewer.