kamrandotpk / vowel-counter
A composer package that counts the number of vowels in a given file or string
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/kamrandotpk/vowel-counter
Requires
- php: >=8.0
Requires (Dev)
- phpunit/phpunit: 10.0.19
This package is not auto-updated.
Last update: 2026-01-08 07:09:12 UTC
README
This package allows you to count the vowels in a file or a string.
Installation:
composer require kamrandotpk/vowel-counter
Example usage:
<?php require_once 'vendor/autoload.php'; $vowelCounter = new \VowelCounter\VowelCounter(); $text = "There are 11 vowels in this sentence."; // count vowels in a file $file = new \SplTempFileObject(); $file->fwrite($text); echo $vowelCounter->countVowelsInFile($file); // outputs 11 // counts vowels in a string echo $vowelCounter->countVowelsInAString($text); // outputs 11
Please see the included Unit Tests for more example usage.
Composer Package URL: https://packagist.org/packages/kamrandotpk/vowel-counter