Downloads
Stars
Version
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
You can install the package via composer:
composer require shawnveltman/texthelpers
use \Shawnveltman\Texthelpers\TextTrait;
This package contains a trait with the following functions:
stripEverythingButNumbersAndPeriods
stripEverythingButNumbers
money_from_cents
Takes in a string or integer with no decimal point (12345), and returns it formatted as a dollar string ($123.45)
money_from_dollars
Takes in a string or integer with a decimal point (123.45), and returns it formatted as a dollar string ($123.45)
format_phone_number
Formats a 10 digit phone number as (xxx) xxx-xxxx (also strips leading 1s)
get_twilio_formatted_number
Adds a +1 to a 10 digit phone number (+1xxxxxxxxxx)
get_ten_digit_phone_number
format_postal_code
Splits a 6 digit string into 2 3 digit components (A1B 2C3)
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.