Text
String Module for dost.This module contains functions for working with strings.
Examples:
>>> from dost import text
>>> text.get_alphabets(text="hello123:l;,")
'hellol'
>>> text.get_numbers(text="hello123:l;,")
'123
>>> text.remove_special_characters(text="hello123:l;,")
'hello123l'
The module contains the following functions:
get_alphabets(text)
: Extract only alphabets from the given string.get_numbers(text)
: Extract only numbers from the given string.remove_special_characters(text)
: Remove special characters from the given string.
get_alphabets(text)
get_numbers(text)
remove_special_characters(text)
Removes special characters from the given string.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
text |
str
|
The string from which special characters are to be removed. |
required |
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
The string without special characters. |
Examples: