Home | History | Annotate | Download | only in text

Lines Matching refs:length

42 CString::CString(const char* str, size_t length)
44 init(str, length);
47 void CString::init(const char* str, size_t length)
52 // We need to be sure we can add 1 to length without overflowing.
53 // Since the passed-in length is the length of an actual existing
56 ASSERT(length < numeric_limits<size_t>::max());
58 m_buffer = CStringBuffer::create(length + 1);
59 memcpy(m_buffer->mutableData(), str, length);
60 m_buffer->mutableData()[length] = '\0';
71 CString CString::newUninitialized(size_t length, char*& characterBuffer)
73 if (length >= numeric_limits<size_t>::max())
77 result.m_buffer = CStringBuffer::create(length + 1);
79 bytes[length] = '\0';
90 size_t length = buffer->length();
91 m_buffer = CStringBuffer::create(length);
92 memcpy(m_buffer->mutableData(), buffer->data(), length);
99 if (a.length() != b.length())
101 return !strncmp(a.data(), b.data(), min(a.length(), b.length()));