@mikezimm/npmfunctions
Version:
Functions used in my SPFx webparts
49 lines (46 loc) • 2.69 kB
TypeScript
/***
* .d8888. d888888b d8888b. d888888b d8b db d888b .d8888.
* 88' YP `~~88~~' 88 `8D `88' 888o 88 88' Y8b 88' YP
* `8bo. 88 88oobY' 88 88V8o 88 88 `8bo.
* `Y8b. 88 88`8b 88 88 V8o88 88 ooo `Y8b.
* db 8D 88 88 `88. .88. 88 V888 88. ~8~ db 8D
* `8888Y' YP 88 YD Y888888P VP V8P Y888P `8888Y'
*
*
import { cleanSPListURL, cleanURL, encodeDecodeString, } from '@mikezimm/npmfunctions/dist/Services/Strings/urlServices';
import { makeid, isGuidgetStringArrayFromString, cleanEmptyElementsFromString } from '@mikezimm/npmfunctions/dist/Services/Strings/stringServices';
import { camelToSentanceCase, camelize, randomizeCase, upperFirstLetter, lowerFirstLetter } from '@mikezimm/npmfunctions/dist/Services/Strings/stringCase';
*/
/***
* .o88b. .d8b. .88b d88. d88888b db d888888b d88888D d88888b
* d8P Y8 d8' `8b 88'YbdP`88 88' 88 `88' YP d8' 88'
* 8P 88ooo88 88 88 88 88ooooo 88 88 d8' 88ooooo
* 8b 88~~~88 88 88 88 88~~~~~ 88 88 d8' 88~~~~~
* Y8b d8 88 88 88 88 88 88. 88booo. .88. d8' db 88.
* `Y88P' YP YP YP YP YP Y88888P Y88888P Y888888P d88888P Y88888P
*
*
*/
/**
* camelToSentanceCase will take camel case and convert to sentance case
* source: https://stackoverflow.com/a/7225450
*
* @param oldString
* @param capFirst = capitalize first letter regardless
*
*/
export declare function camelToSentanceCase(oldString: string, capFirst?: boolean): string;
export declare function camelize(str: string, firstCap: boolean): string;
export declare function upperFirstLetter(str: string, onErrorReturnEmpty: boolean): string;
export declare function lowerFirstLetter(str: string, onErrorReturnEmpty: boolean): string;
/***
* d8888b. .d8b. d8b db d8888b. .d88b. .88b d88. d888888b d88888D d88888b .o88b. .d8b. .d8888. d88888b
* 88 `8D d8' `8b 888o 88 88 `8D .8P Y8. 88'YbdP`88 `88' YP d8' 88' d8P Y8 d8' `8b 88' YP 88'
* 88oobY' 88ooo88 88V8o 88 88 88 88 88 88 88 88 88 d8' 88ooooo 8P 88ooo88 `8bo. 88ooooo
* 88`8b 88~~~88 88 V8o88 88 88 88 88 88 88 88 88 d8' 88~~~~~ 8b 88~~~88 `Y8b. 88~~~~~
* 88 `88. 88 88 88 V888 88 .8D `8b d8' 88 88 88 .88. d8' db 88. Y8b d8 88 88 db 8D 88.
* 88 YD YP YP VP V8P Y8888D' `Y88P' YP YP YP Y888888P d88888P Y88888P `Y88P' YP YP `8888Y' Y88888P
*
*
*/
export declare function randomizeCase(str: string): string;