function _search_index_truncate

Same name in other branches
  1. 8.9.x core/modules/search/search.module \_search_index_truncate()

Helper function for array_walk in search_index_split.

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

File

modules/search/search.module, line 525

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.