@@ -98,7 +98,6 @@ struct StrName {
const char* c_str() const;
bool empty() const { return index == 0; }
- friend std::ostream& operator<<(std::ostream& os, const StrName& sn);
Str escape() const;
bool operator==(const StrName& other) const noexcept {
@@ -388,10 +388,6 @@ int utf8len(unsigned char c, bool suppress){
return cnt;
}
- std::ostream& operator<<(std::ostream& os, const StrName& sn){
- return os << sn.sv();
- }
-
std::map<std::string, uint16_t, std::less<>>& StrName::_interned(){
static std::map<std::string, uint16_t, std::less<>> interned;
return interned;
@@ -180,3 +180,8 @@ assert list(a) == ['测']
assert '\b\b\b' == '\x08\x08\x08'
stack=[1,2,3,4]; assert f"{stack[2:]}" == '[3, 4]'
+
+assert repr('\x1f\x1e\x1f') == '\'\\x1f\\x1e\\x1f\''
+assert hex(255) == '0xFF'
+assert hex(-42) == '-0x2A'