Package Exports
- string-utils-kunal
- string-utils-kunal/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (string-utils-kunal) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
this npm package will provide you differnt methods to perform on an string which can make your experience on working with strings lot more easier.
@for installation #bash npm i string-utils-kunal
the method this package provide are -
@Case Conversion: # note : (please use[ - , _ ] where you want camel or pascal case while using camelCase,pascalCase for correct result)
=>toCamelCase(str): Converts a string to camelCase. =>toPascalCase(str): Converts a string to PascalCase. =>toSnakeCase(str): Converts a string to snake_case. =>toKebabCase(str): Converts a string to kebab-case.
@Trimming: =>trimStart(str): Trims whitespace from the start of a string. =>trimEnd(str): Trims whitespace from the end of a string. =>trim(str): Trims whitespace from both ends of a string.
@Padding: =>padStart(str, length, char): Pads the start of a string with a specified character until it reaches a given length. =>padEnd(str, length, char): Pads the end of a string with a specified character until it reaches a given length.
@Case Checking: =>isUpperCase(str): Checks if a string is in uppercase. =>isLowerCase(str): Checks if a string is in lowercase.
@Miscellaneous: =>reverse(str): Reverses a string. =>includes(str, searchStr): Checks if a string includes a given substring. =>truncate(str, length): Truncates a string to a specified length and adds ellipses (...) at the end if necessary.