MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / write

Method write

JUCE/modules/juce_core/text/juce_String.cpp:1333–1346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1331 }
1332
1333 void write (juce_wchar c)
1334 {
1335 bytesWritten += String::CharPointerType::getBytesRequiredFor (c);
1336
1337 if (bytesWritten > allocatedBytes)
1338 {
1339 allocatedBytes += jmax ((size_t) 8, allocatedBytes / 16);
1340 auto destOffset = (size_t) (((char*) dest.getAddress()) - (char*) result.getCharPointer().getAddress());
1341 result.preallocateBytes (allocatedBytes);
1342 dest = addBytesToPointer (result.getCharPointer().getAddress(), (int) destOffset);
1343 }
1344
1345 dest.write (c);
1346 }
1347
1348 String result;
1349 String::CharPointerType source { nullptr }, dest { nullptr };

Callers 15

readAllProcessOutputMethod · 0.45
charToStringMethod · 0.45
juce_String.cppFile · 0.45
paddedLeftMethod · 0.45
paddedRightMethod · 0.45
replaceCharacterMethod · 0.45
replaceCharactersMethod · 0.45
toUpperCaseMethod · 0.45
toLowerCaseMethod · 0.45
retainCharactersMethod · 0.45
removeCharactersMethod · 0.45
toHexStringMethod · 0.45

Calls 4

jmaxFunction · 0.85
addBytesToPointerFunction · 0.85
preallocateBytesMethod · 0.80
getAddressMethod · 0.45

Tested by

no test coverage detected