You are here

function _bootstrap_library_string_to_array in Bootstrap Library 8

Converts a text with lines (\n) into an array of lines.

Return value

array Array with as many items as non-empty lines in the text

File

./bootstrap_library.module, line 136
Primarily Drupal hooks.

Code

function _bootstrap_library_string_to_array($text) {
  $text = str_replace("\r\n", "\n", $text);
  return array_filter(explode("\n", $text), 'trim');
}