MCPcopy Create free account
hub / github.com/brofield/simpleini / OutputMultiLineText

Method OutputMultiLineText

SimpleIni.h:2681–2703  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2679
2680template <class SI_CHAR, class SI_STRLESS, class SI_CONVERTER>
2681bool CSimpleIniTempl<SI_CHAR, SI_STRLESS, SI_CONVERTER>::OutputMultiLineText(
2682 OutputWriter &a_oOutput, Converter &a_oConverter,
2683 const SI_CHAR *a_pText) const {
2684 const SI_CHAR *pEndOfLine;
2685 SI_CHAR cEndOfLineChar = *a_pText;
2686 while (cEndOfLineChar) {
2687 // find the end of this line
2688 pEndOfLine = a_pText;
2689 for (; *pEndOfLine && *pEndOfLine != '\n'; ++pEndOfLine) /*loop*/
2690 ;
2691 cEndOfLineChar = *pEndOfLine;
2692
2693 const std::basic_string<SI_CHAR> line(
2694 a_pText, static_cast<size_t>(pEndOfLine - a_pText));
2695 if (!a_oConverter.ConvertToStore(line.c_str())) {
2696 return false;
2697 }
2698 a_pText += (pEndOfLine - a_pText) + 1;
2699 a_oOutput.Write(a_oConverter.Data());
2700 a_oOutput.Write(SI_NEWLINE_A);
2701 }
2702 return true;
2703}
2704
2705template <class SI_CHAR, class SI_STRLESS, class SI_CONVERTER>
2706bool CSimpleIniTempl<SI_CHAR, SI_STRLESS, SI_CONVERTER>::Delete(

Callers

nothing calls this directly

Calls 3

DataMethod · 0.80
ConvertToStoreMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected