Example #1
0
HOT_FUNC
String operator+(const String & lhs, const String & rhs) {
  if (lhs.empty()) return rhs;
  if (rhs.empty()) return lhs;
  return NEW(StringData)(lhs.slice(), rhs.slice());
}
Example #2
0
HOT_FUNC
String operator+(const String & lhs, String&& rhs) {
  return NEW(StringData)(lhs.slice(), rhs.slice());
}
Example #3
0
String operator+(const String & lhs, litstr rhs) {
  if (lhs.empty()) return rhs;
  if (!rhs || !*rhs) return lhs;
  return NEW(StringData)(lhs.slice(), rhs);
}
Example #4
0
HOT_FUNC
String operator+(const String & lhs, String&& rhs) {
    return StringData::Make(lhs.slice(), rhs.slice());
}
Example #5
0
String operator+(const String & lhs, const String & rhs) {
  if (lhs.empty()) return rhs;
  if (rhs.empty()) return lhs;
  return String::attach(StringData::Make(lhs.slice(), rhs.slice()));
}
Example #6
0
String operator+(const String & lhs, String&& rhs) {
  return String::attach(StringData::Make(lhs.slice(), rhs.slice()));
}