Every line of 'how to convert uppercase to lowercase in python' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
6 def toUpperCase(s): 7 return s.upper()
22 def uppercase(func): 23 @functools.wraps(func) 24 def wrapper(): 25 original_result = func() 26 modified_result = original_result.upper() 27 return modified_result 28 return wrapper
132 def convert(name): 133 s1 = re.sub(r'(.)([A-Z][a-z]+)', r'\1_\2', name) 134 return re.sub(r'([a-z0-9])([A-Z])', r'\1_\2', s1).upper()
177 async def convertWordCase(string: str, case: str) -> str: 178 """Convert the matched words in the necessary case. Used for \\F and \\I. 179 180 Args: 181 string (``str``): 182 The string containing the case. 183 case (``str``): 184 The case to search for. 185 186 Returns: 187 ``str`` | ``None``: 188 The replaced string on success, None otherwise. 189 """ 190 trmintr = endCaseConversions.get(case) 191 exp = "({}).+?({}|{}|$)".format(re.escape(case), trmintr, r'\\E') 192 match = re.search(exp, string, flags=re.DOTALL) 193 if match: 194 start, end = match.span() 195 toStrip = match.group(1) 196 terminator = match.group(2) 197 if terminator: 198 tend = -2 if terminator == r"\E" else -3 199 tmp = match.group(0) 200 tmp1 = tmp[2:tend] 201 if toStrip == r"\F": 202 repl = tmp1[0].upper() + tmp1[1:].lower() 203 string = string[:start] + repl + string[end:] 204 else: 205 string = string[:start] + tmp1.title() + string[end:] 206 else: 207 tmp = string[start:] 208 tmp1 = tmp[2:] 209 if toStrip == r"\F": 210 string = string[:start] + tmp1[0].upper() + tmp1[1:].lower() 211 else: 212 string = string[:start] + tmp1.title() 213 return string
274 def to_camel_java(text, first_lower=True): 275 """Returns the text in camelCase or CamelCase format for Java 276 277 """ 278 return to_camelcase(text, first_lower=first_lower, 279 reserved_keywords=JAVA_KEYWORDS, suffix="_")