Documentación GVHIDRA 3.1.5
Referencia del Archivo modifier.count_words.php

Ir al código fuente de este archivo.

Namespaces

namespace  Smarty

Funciones

 smarty_modifier_count_words ($string)

Documentación de las funciones

smarty_modifier_count_words ( string)

Smarty count_words modifier plugin

Type: modifier
Name: count_words
Purpose: count the number of words in a text count_words (Smarty online manual) Monte Ohrt

Parámetros:
string
Devuelve:
integer

Definición en la línea 21 del archivo modifier.count_words.php.

{
    // split text by ' ',\r,\n,\f,\t
    $split_array = preg_split('/\s+/',$string);
    // count matches that contain alphanumerics
    $word_count = preg_grep('/[a-zA-Z0-9\\x80-\\xff]/', $split_array);

    return count($word_count);
}