Rose::StringUtility::stringToList
Split a string into substrings at line feeds.
Synopsis
Declared in <src/Rose/StringUtility/SplitJoin.h>
[[visibility]]
std::list<std::string>
stringToList(std::string const&);
Description
Splits the input string into substrings at the linefeed characters to construct a list, then removes empty strings from the list.
The original implementation (pre‐2016) had a bug (ROSE‐304) that caused the last substring to not be returned if it was not followed by a linefeed. That implementation was also slow for large inputs (ROSE‐305). Both of these are now fixed since stringToList is now implemented in terms of split.
Return Value
List of non‐empty lines.
Created with MrDocs