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

Method writeString

JUCE/modules/juce_core/streams/juce_OutputStream.cpp:183–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183bool OutputStream::writeString (const String& text)
184{
185 auto numBytes = text.getNumBytesAsUTF8() + 1;
186
187 #if (JUCE_STRING_UTF_TYPE == 8)
188 return write (text.toRawUTF8(), numBytes);
189 #else
190 // (This avoids using toUTF8() to prevent the memory bloat that it would leave behind
191 // if lots of large, persistent strings were to be written to streams).
192 HeapBlock<char> temp (numBytes);
193 text.copyToUTF8 (temp, numBytes);
194 return write (temp, numBytes);
195 #endif
196}
197
198bool OutputStream::writeText (const String& text, bool asUTF16, bool writeUTF16ByteOrderMark, const char* lf)
199{

Callers 9

writePanelXmlMethod · 0.45
createFromMethod · 0.45
writeToStreamMethod · 0.45
writeToStreamMethod · 0.45
writeToStreamFunction · 0.45
writeObjectToStreamFunction · 0.45
runTestMethod · 0.45
saveFunction · 0.45

Calls 4

getNumBytesAsUTF8Method · 0.80
toRawUTF8Method · 0.80
copyToUTF8Method · 0.80
writeFunction · 0.50

Tested by

no test coverage detected