function phutil_split_lines($corpus, $retain_endings)libphutil Technical Documentation (Core Utilities)
function phutil_split_lines($corpus, $retain_endings)
libphutil Technical Documentation (Core Utilities)
Split a corpus of text into lines. This function splits on "\n", "\r\n", or a mixture of any of them.
NOTE: This function does not treat "\r" on its own as a newline because none
of SVN, Git or Mercurial do on any OS.
Parameters
string | $corpus | Block of text to be split into lines. |
bool | $retain_endings | If true, retain line endings in result strings. |
Return
list | List of lines. |
- Defined
- src/utils/utils.php:910