Skip to content

Commit

Permalink
Fix GSM 03.38 charset (#5)
Browse files Browse the repository at this point in the history
Fix to avoid removing valid characters
Add more tests
Fix travis
  • Loading branch information
markitosgv authored Mar 21, 2017
1 parent f10c5be commit 0691cf1
Show file tree
Hide file tree
Showing 5 changed files with 272 additions and 214 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ php:
- hhvm

before_script:
- composer install --dev
- composer install

script: phpunit
script: vendor/bin/phpunit
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ Character counter for SMS Messages
[![Build Status](https://img.shields.io/travis/instasent/sms-counter-php.svg?style=flat-square)](https://travis-ci.org/instasent/sms-counter-php)
[![SensioLabsInsight](https://img.shields.io/sensiolabs/i/0a2fa87a-0287-46f6-b8b5-818b44a2b9f9.svg?style=flat-square)](https://insight.sensiolabs.com/projects/0a2fa87a-0287-46f6-b8b5-818b44a2b9f9)

##Usage
## Usage

```php
use Instasent\SMSCounter\SMSCounter;

$smsCounter = new SMSCounter;
$smsCounter = new SMSCounter();
$smsCounter->count('some-string-to-be-counted');
```

Expand All @@ -26,23 +26,32 @@ stdClass Object
)
```

##Installation
You can sanitize your text to be a valid GSM 03.38 charset

```php
use Instasent\SMSCounter\SMSCounter;

$smsCounter = new SMSCounter();
$smsCounter->sanitizeToGSM('dadáó'); //return dadao
```

## Installation

`sms-counter-php` is available via [composer](http://getcomposer.org) on [packagist](https://packagist.org/packages/instasent/sms-counter-php).

```json
{
"require": {
"instasent/sms-counter-php": "dev-master"
}
"require": {
"instasent/sms-counter-php": "^0.3"
}
}
```

##License
## License

SMS Counter (PHP) is released under the [MIT License](LICENSE-MIT.md)

###Mentions
### Mentions

* Original idea : [danxexe/sms-counter](https://github.com/danxexe/sms-counter)
* Fork Idea from: [acpmasquerade/sms-counter-php](https://github.com/acpmasquerade/sms-counter-php)
Loading

0 comments on commit 0691cf1

Please sign in to comment.