Lines Matching defs:string
9 #include "src/strings/string-builder-inl.h"
40 String string = String::cast(element);
41 int element_length = string.length();
42 String::WriteToFlat(string, sink + position, 0, element_length);
181 void ReplacementStringBuilder::AddString(Handle<String> string) {
182 int length = string->length();
184 AddElement(string);
185 if (!string->IsOneByteRepresentation()) {
238 // Create an accumulator handle starting with the empty string.
294 // the incoming string to have one byte representation "underneath" (The
295 // one byte check requires the string to be flat).
296 bool IncrementalStringBuilder::CanAppendByCopy(Handle<String> string) {
300 (string->IsFlat() && String::IsOneByteRepresentationUnderneath(*string));
302 return representation_ok && string->length() <= kMaxStringLengthForCopy &&
303 CurrentPartCanFit(string->length());
306 void IncrementalStringBuilder::AppendStringByCopy(Handle<String> string) {
307 DCHECK(CanAppendByCopy(string));
313 String::WriteToFlat(*string, part->GetChars(no_gc) + current_index_, 0,
314 string->length());
316 current_index_ += string->length();
321 void IncrementalStringBuilder::AppendString(Handle<String> string) {
322 if (CanAppendByCopy(string)) {
323 AppendStringByCopy(string);
330 Accumulate(string);