text
xsdata.utils.text
CharType
Character types.
Source code in xsdata/utils/text.py
164 165 166 167 168 169 170 |
|
prefix(value, sep=':')
Return the first part of the string before the separator.
Source code in xsdata/utils/text.py
68 69 70 |
|
suffix(value, sep=':')
Return the last part of the string after the separator.
Source code in xsdata/utils/text.py
73 74 75 |
|
split(value, sep=':')
Split the given value with the given separator once.
Source code in xsdata/utils/text.py
78 79 80 81 |
|
capitalize(value, **kwargs)
Capitalize the given string.
Source code in xsdata/utils/text.py
84 85 86 |
|
original_case(value, **kwargs)
Return the input string without any modifications.
Source code in xsdata/utils/text.py
89 90 91 |
|
pascal_case(value, **kwargs)
Convert the given string to pascal case.
Source code in xsdata/utils/text.py
94 95 96 |
|
camel_case(value, **kwargs)
Convert the given string to camel case.
Source code in xsdata/utils/text.py
99 100 101 102 |
|
mixed_case(value, **kwargs)
Convert the given string to mixed case.
Source code in xsdata/utils/text.py
105 106 107 |
|
mixed_pascal_case(value, **kwargs)
Convert the given string to mixed pascal case.
Source code in xsdata/utils/text.py
110 111 112 |
|
mixed_snake_case(value, **kwargs)
Convert the given string to mixed snake case.
Source code in xsdata/utils/text.py
115 116 117 |
|
snake_case(value, **kwargs)
Convert the given string to snake case.
Source code in xsdata/utils/text.py
120 121 122 |
|
screaming_snake_case(value, **kwargs)
Convert the given string to screaming snake case.
Source code in xsdata/utils/text.py
125 126 127 |
|
kebab_case(value, **kwargs)
Convert the given string to kebab case.
Source code in xsdata/utils/text.py
130 131 132 |
|
split_words(value)
Split a string on capital letters and not alphanumeric characters.
Source code in xsdata/utils/text.py
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
|
classify(character)
String classifier.
Source code in xsdata/utils/text.py
173 174 175 176 177 178 179 180 181 182 183 184 185 |
|
escape_string(value)
Escape a string for code generation.
Source code in xsdata/utils/text.py
202 203 204 205 206 207 208 |
|
alnum(value)
Return the ascii alphanumerical characters in lower case.
Source code in xsdata/utils/text.py
214 215 216 |
|
variable(value)
Returns a version of the string that will be a valid Python variable.
Source code in xsdata/utils/text.py
219 220 221 222 223 224 |
|