text
xsdata.utils.text
CharType
Character types.
Source code in xsdata/utils/text.py
168 169 170 171 172 173 174 |
|
prefix(value, sep=':')
Return the first part of the string before the separator.
Source code in xsdata/utils/text.py
69 70 71 |
|
suffix(value, sep=':')
Return the last part of the string after the separator.
Source code in xsdata/utils/text.py
74 75 76 |
|
split(value, sep=':')
Split the given value with the given separator once.
Source code in xsdata/utils/text.py
79 80 81 82 |
|
capitalize(value, **kwargs)
Capitalize the given string.
Source code in xsdata/utils/text.py
85 86 87 |
|
original_case(value, **kwargs)
Return the input string but ensure it's a valid Python variable.
Source code in xsdata/utils/text.py
90 91 92 93 94 95 |
|
pascal_case(value, **kwargs)
Convert the given string to pascal case.
Source code in xsdata/utils/text.py
98 99 100 |
|
camel_case(value, **kwargs)
Convert the given string to camel case.
Source code in xsdata/utils/text.py
103 104 105 106 |
|
mixed_case(value, **kwargs)
Convert the given string to mixed case.
Source code in xsdata/utils/text.py
109 110 111 |
|
mixed_pascal_case(value, **kwargs)
Convert the given string to mixed pascal case.
Source code in xsdata/utils/text.py
114 115 116 |
|
mixed_snake_case(value, **kwargs)
Convert the given string to mixed snake case.
Source code in xsdata/utils/text.py
119 120 121 |
|
snake_case(value, **kwargs)
Convert the given string to snake case.
Source code in xsdata/utils/text.py
124 125 126 |
|
screaming_snake_case(value, **kwargs)
Convert the given string to screaming snake case.
Source code in xsdata/utils/text.py
129 130 131 |
|
kebab_case(value, **kwargs)
Convert the given string to kebab case.
Source code in xsdata/utils/text.py
134 135 136 |
|
split_words(value)
Split a string on capital letters and not alphanumeric characters.
Source code in xsdata/utils/text.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
|
classify(character)
String classifier.
Source code in xsdata/utils/text.py
177 178 179 180 181 182 183 184 185 186 187 188 189 |
|
escape_string(value)
Escape a string for code generation.
Source code in xsdata/utils/text.py
206 207 208 209 210 211 212 |
|
alnum(value)
Return the ascii alphanumerical characters in lower case.
Source code in xsdata/utils/text.py
218 219 220 |
|