summaryrefslogtreecommitdiff
path: root/core/ustring.cpp
diff options
context:
space:
mode:
authorHein-Pieter van Braam <hp@tmm.cx>2019-01-04 20:57:22 +0100
committerGitHub <noreply@github.com>2019-01-04 20:57:22 +0100
commit5e6c6f3bb745f8d9be4df938f6cf49dfb552b761 (patch)
tree15a9605eff637126c571704469a6877fddd7d2a3 /core/ustring.cpp
parentb6cf37cb57ba886993f61febad10c90596ab3a60 (diff)
parentac99ed3cda12abe155f16a96ac0c716b2dbe6231 (diff)
Merge pull request #21708 from hpvb/fix-21242v2
String[size()] should return a default constructed CharType
Diffstat (limited to 'core/ustring.cpp')
-rw-r--r--core/ustring.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp
index 75fe36dd37..311aa52d40 100644
--- a/core/ustring.cpp
+++ b/core/ustring.cpp
@@ -58,6 +58,9 @@
#define IS_DIGIT(m_d) ((m_d) >= '0' && (m_d) <= '9')
#define IS_HEX_DIGIT(m_d) (((m_d) >= '0' && (m_d) <= '9') || ((m_d) >= 'a' && (m_d) <= 'f') || ((m_d) >= 'A' && (m_d) <= 'F'))
+const char CharString::_null = 0;
+const CharType String::_null = 0;
+
bool is_symbol(CharType c) {
return c != '_' && ((c >= '!' && c <= '/') || (c >= ':' && c <= '@') || (c >= '[' && c <= '`') || (c >= '{' && c <= '~') || c == '\t' || c == ' ');
}