text
xsdata.utils.text
CharType
Character types.
Source code in xsdata/utils/text.py
165 166 167 168 169 170 171 |
|
prefix(value, sep=':')
Return the first part of the string before the separator.
Source code in xsdata/utils/text.py
66 67 68 |
|
suffix(value, sep=':')
Return the last part of the string after the separator.
Source code in xsdata/utils/text.py
71 72 73 |
|
split(value, sep=':')
Split the given value with the given separator once.
Source code in xsdata/utils/text.py
76 77 78 79 |
|
capitalize(value, **kwargs)
Capitalize the given string.
Source code in xsdata/utils/text.py
82 83 84 |
|
original_case(value, **kwargs)
Return the input string but ensure it's a valid Python variable.
Source code in xsdata/utils/text.py
87 88 89 90 91 92 |
|
pascal_case(value, **kwargs)
Convert the given string to pascal case.
Source code in xsdata/utils/text.py
95 96 97 |
|
camel_case(value, **kwargs)
Convert the given string to camel case.
Source code in xsdata/utils/text.py
100 101 102 103 |
|
mixed_case(value, **kwargs)
Convert the given string to mixed case.
Source code in xsdata/utils/text.py
106 107 108 |
|
mixed_pascal_case(value, **kwargs)
Convert the given string to mixed pascal case.
Source code in xsdata/utils/text.py
111 112 113 |
|
mixed_snake_case(value, **kwargs)
Convert the given string to mixed snake case.
Source code in xsdata/utils/text.py
116 117 118 |
|
snake_case(value, **kwargs)
Convert the given string to snake case.
Source code in xsdata/utils/text.py
121 122 123 |
|
screaming_snake_case(value, **kwargs)
Convert the given string to screaming snake case.
Source code in xsdata/utils/text.py
126 127 128 |
|
kebab_case(value, **kwargs)
Convert the given string to kebab case.
Source code in xsdata/utils/text.py
131 132 133 |
|
split_words(value)
Split a string on capital letters and not alphanumeric characters.
Source code in xsdata/utils/text.py
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 162 |
|
classify(character)
String classifier.
Source code in xsdata/utils/text.py
174 175 176 177 178 179 180 181 182 183 184 185 186 |
|
escape_string(value)
Escape a string for code generation.
Source code in xsdata/utils/text.py
203 204 205 206 207 208 209 |
|
alnum(value)
Return the ascii alphanumerical characters in lower case.
Source code in xsdata/utils/text.py
215 216 217 |
|