w10schools
Login Register
  • Home
  • Tutorials
    • HTML, CSS
      • HTML, HTML5
      • CSS, CSS3
    • XML
    • JavaScript, AJAX
    • PHP
    • Ruby on Rails
      • Ruby
      • Rails
    • ASP.NET
      • ASP
      • C# .NET
    • Java
      • JSP
    • Databases
      • MySQL
      • MSSQL Server
      • Oracle
    • Web Server
      • Windows
      • Linux
      • Apache
      • IIS
    • Design
      • Dreamweaver
      • Flash
      • Photoshop
      • Fireworks
      • CorelDRAW
      • Illustrator
  • References
    • HTML
      • Bootstrap
    • CSS
      • CSS Selectors
      • Sass
    • JavaScript
    • Mobile Apps
      • Cordova
    • Ruby on Rails
      • Ruby
      • Rails
    • PHP
      • Function
      • Language
      • CodeIgniter
      • Phalcon
      • PHPUnit
      • Symfony
      • Drupal
      • Yii
      • Laravel
    • Perl
      • Perl
    • Python
      • Python
      • Django
      • NumPy
      • Pandas
      • scikit-image
      • scikit-learn
      • Statsmodels
      • Matplotlib
    • Lua
      • Lua
    • C, C++
      • C
      • C++
    • Server
      • Docker
      • Apache HTTP Server
      • Nginx
    • Database
      • PostgreSQL
    • Big Data
      • TensorFlow
    • Game Development
      • Phaser
      • LÖVE
  • Articles
    • News
    • General
      • Website Promotion
      • Online Advertising
      • Make Money Online
    • Editorials
    • Interviews
    • Web Roundups
  • Resources
    • Design
      • Fonts
      • Graphics
      • Vectors
      • Templates
      • UI (User Interface)
      • Brushes
      • Patterns, Backgrounds
      • Textures
    • Web Development
      • HTML, CSS
      • XML
      • JavaScript, AJAX
      • Ruby on Rails
      • PHP
      • Java
      • .NET
      • Python
      • Perl
      • Flash
    • Mobile Application Development
      • Mobile Development Tools
      • Swift
    • Online Services
      • Online Storage
      • Web Hosting
  • Tools
    • Generators
Edit
In Place Editing Advanced Editing
  • References
  • PHP
  • Yii
  • helpers
  • BaseStringHelper

helpers\BaseStringHelper countWords()

countWords() public static method (available since version 2.0.8)

Counts words in a string

public static integer countWords ( $string )
$string string
Links:
  • http://www.yiiframework.com/doc-2.0/yii-helpers-basestringhelper.html#countWords()-detail
doc_Yii
doc_Yii
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.

Popular Articles
helpers\BaseStringHelper basename() basename() public static method Returns the trailing name component of a path. This method is similar to the php function basename() except that
helpers\BaseStringHelper truncateHtml() truncateHtml() protected static method (available since version 2.0.1) Truncate a string while preserving the HTML. protected static string tru
helpers\BaseStringHelper byteLength() byteLength() public static method Returns the number of bytes in the given string. This method ensures the string is treated as a byte array by u
helpers\BaseStringHelper truncate() truncate() public static method Truncates a string to the number of characters specified. public static string truncate ( $string, $length, $su
helpers\BaseStringHelper byteSubstr() byteSubstr() public static method Returns the portion of string specified by the start and length parameters. This method ensures the string is t


Return to View
  • Facebook
  • Tweet
  • Digg it
  • Stumbleupon
  • Delicious
  • Plus Share

Designed by : w10schools

service@w10schools.com

Our Partners: aeeble – Providing content publishing and search solutions