match_case
Matches the casing of the first string to the casing of the second string, returning the first string in either all uppercase or all lowercase.
def match_case(
s: string,
other: string
) - > string
Adjusts the casing of a string to match the casing of another reference string.
Parameters
| Name | Type | Description |
|---|---|---|
| s | string | The target string that will have its casing modified. |
| other | string | The reference string used to determine whether the target string should be uppercase or lowercase. |
Returns
| Type | Description |
|---|---|
string | The input string converted to uppercase if the reference string is uppercase, otherwise converted to lowercase. |