Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,18 @@ Will return the `String` without the diacritics.
//=> 'وترى الكواكب في المجرة شرعا *** مثل الظباء كوارعا في جدول'
```

## License
##String#removeTatwel()

Will return the `String` without the diacritics.

### Example

```js
'مــرحــبــا'.removeTatwel()
//=> 'مرحبا'
```

## License

(The MIT License)

Expand All @@ -92,4 +103,3 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

17 changes: 17 additions & 0 deletions arabicString.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,20 @@ String.prototype.removeArabic = function () {

return this.replace(/[\u0621-\u0652]/gm, '');
}

/**
* Remove Tatwel letters
*
* Example
*
* 'مــرحــبــا'.removeTatwel()
* //=> 'مرحبا'
*
*
*
* @returns {String}
*/

String.prototype.removeTatwel = function() {
return this.replace(/\u0640/g, '');
}