function _search_index_truncate

7.x search.module _search_index_truncate(&$text)
5.x search.module _search_index_truncate(&$text)
6.x search.module _search_index_truncate(&$text)
8.x search.module _search_index_truncate(&$text)

Helper function for array_walk in search_index_split.

1 string reference to '_search_index_truncate'
search_simplify in drupal/modules/search/search.module
Simplifies a string according to indexing rules.

File

drupal/modules/search/search.module, line 525
Enables site-wide keyword searching.

Code

function _search_index_truncate(&$text) {
  if (is_numeric($text)) {
    $text = ltrim($text, '0');
  }
  $text = truncate_utf8($text, 50);
}