Lines Matching refs:s
112 static s32 CalculateLength(const Char* s, s32 maxLength) in CalculateLength() argument
116 if (!s[i]) in CalculateLength()
125 void CopyFrom(const T* s, s32 i = 0)
129 if (!*s)
134 this->m_Data[i] = *s++;
180 FixedLengthString(const T* s) in FixedLengthString() argument
182 if (s) in FixedLengthString()
186 CopyFrom(s); in FixedLengthString()
233 FixedLengthString& AppendHead(const FixedLengthString<Char, Length, Size>& s) in AppendHead() argument
235 if (!this->IsValid() || !s.IsValid()) in AppendHead()
240 if (this->GetHeadIndex() < s.GetLength()) in AppendHead()
243 SetLength(this->GetLength() + s.GetLength()); in AppendHead()
246 std::memmove(m_Data + s.GetLength(), m_Data, sizeof(Char) * originalLength); in AppendHead()
247 std::memcpy(m_Data, s.GetString(), sizeof(Char) * s.GetLength()); in AppendHead()
253 SetHead(GetHeadIndex() - s.GetLength()); in AppendHead()
254 SetLength(this->GetLength() + s.GetLength()); in AppendHead()
257 std::memcpy(m_Data, s.GetString(), s.GetLength() * sizeof(Char)); in AppendHead()
263 FixedLengthString& AppendHead(const Char* s) in AppendHead() argument
269 s32 length = CalculateLength(s, MaxLength - this->GetLength()); in AppendHead()
277 std::memcpy(m_Data, s, sizeof(Char) * length); in AppendHead()
287 std::memcpy(m_Data, s, length * sizeof(Char)); in AppendHead()
294 FixedLengthString& AppendTail(const FixedLengthString<Char, Length, Size>& s) in AppendTail() argument
296 if (!this->IsValid() || !s.IsValid()) in AppendTail()
306 SetLength(this->GetLength() + s.GetLength()); in AppendTail()
309 std::memcpy(p, s.GetString(), sizeof(Char) * s.GetLength()); in AppendTail()
315 FixedLengthString& AppendTail(const Char* s) in AppendTail() argument
325 CopyFrom(s, this->GetLength()); in AppendTail()
355 FixedLengthString& AppendTail(const Char2* s, size_t size) in AppendTail() argument
371 p[i] = s[i]; in AppendTail()
379 FixedLengthString& AppendTail(const Char2 s[Size]) in AppendTail()
381 return AppendTail(s, Size); in AppendTail()
413 FixedLengthString& operator+=(const Char2 s[Size]) { return AppendTail(s); }
495 void CopyFrom(const Char* s) in CopyFrom() argument
499 this->m_Buffer[i] = *s; in CopyFrom()
500 if (!*s++) in CopyFrom()
505 NN_TWARNING_(*s, "too long string."); in CopyFrom()
506 if (*s) in CopyFrom()
520 LightFixedLengthString(const Char* s) in LightFixedLengthString() argument
522 CopyFrom(s); in LightFixedLengthString()
525 LightFixedLengthString(const Char* s, size_t size) in LightFixedLengthString() argument
532 std::memcpy(this->m_Buffer, s, size); in LightFixedLengthString()
558 LightFixedLengthString& operator=(const Char* s)
560 CopyFrom(s);