PageRenderTime 45ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/modules/quicky/classes/plugins/modifier.count_characters.php

https://bitbucket.org/seyar/parshin.local
PHP | 8 lines | 6 code | 2 blank | 0 comment | 1 complexity | 3f8a69b2fbf590ea5928ddc7ce6fc0fd MD5 | raw file
Possible License(s): BSD-3-Clause, LGPL-2.1
  1. <?php
  2. function quicky_modifier_count_characters($string,$include_spaces = FALSE)
  3. {
  4. if ($include_spaces) {return strlen($string);}
  5. return preg_match_all('~\S~',$string,$match);
  6. }