remeda
Version:
A utility library for JavaScript and Typescript.
49 lines • 2.27 kB
text/typescript
//#region src/toUpperCase.d.ts
/**
* Replaces all lower-case characters to their upper-case equivalent in the
* input. Uses the built-in [`String.prototype.toUpperCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase)
* for the runtime, and the built-in [`Uppercase`](https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html#uppercasestringtype)
* utility type for typing.
*
* For other case manipulations see: `toLowerCase`, `capitalize`,
* `uncapitalize`, `toCamelCase`, `toKebabCase`, and `toSnakeCase`.
*
* !IMPORTANT: This function might work _incorrectly_ for **non-ascii** inputs.
* If the output is intended for display (on a browser) consider using
* [the `text-transform: uppercase;` CSS property](https://developer.mozilla.org/en-US/docs/Web/CSS/text-transform)
* instead!
*
* @param data - A string.
* @signature
* R.toUpperCase(data);
* @example
* R.toUpperCase("Hello World"); // "HELLO WORLD"
* @dataFirst
* @category String
*/
declare function toUpperCase<T extends string>(data: T): Uppercase<T>;
/**
* Replaces all lower-case characters to their upper-case equivalent in the
* input. Uses the built-in [`String.prototype.toUpperCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase)
* for the runtime, and the built-in [`Uppercase`](https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html#uppercasestringtype)
* utility type for typing.
*
* For other case manipulations see: `toLowerCase`, `capitalize`,
* `uncapitalize`, `toCamelCase`, `toKebabCase`, and `toSnakeCase`.
*
* !IMPORTANT: This function might work _incorrectly_ for **non-ascii** inputs.
* If the output is intended for display (on a browser) consider using
* [the `text-transform: uppercase;` CSS property](https://developer.mozilla.org/en-US/docs/Web/CSS/text-transform)
* instead!
*
* @signature
* R.toUpperCase()(data);
* @example
* R.pipe("Hello World", R.toUpperCase()); // "HELLO WORLD"
* @dataLast
* @category String
*/
declare function toUpperCase(): <T extends string>(data: T) => Uppercase<T>;
//#endregion
export { toUpperCase };
//# sourceMappingURL=toUpperCase-tyGxHQ7U.d.cts.map