This package has been deprecated

Author message:

see @kingjs/string-ex namespace

@kingjs/case-at

1.0.5 • Public • Published

@kingjs/case-at

Functions for testing and setting the case of a character in a string.

Usage

Test the if "H" in "Hello World!" is upper case like this:

var caseAt = require('@kingjs/case-at');
caseAt.isRaised("Hello World!", 0);

returns

true

Lower the the case of "W" in "Hello world!" like this:

var caseAt = require('@kingjs/case-at');
caseAt.lower("Hello World!", 6);

returns

"Hello world!"

API

declare function isRaised(value: string, index: number): boolean;
declare function isLowered(value: string, index: number): boolean;
declare function raise(value: string, index: number): string;
declare function lower(value: string, index: number): string;

Parameters

isRaised: True if the character at string's index is upper case.

isLower: True if the character at string's index is lower case.

raise: Raise the case of the character at string's index.

lower: Lower the case of the character at string's index.

Install

With npm installed, run

$ npm install @kingjs/case-at

License

MIT

Analytics

/@kingjs/case-at/

    Package Sidebar

    Install

    npm i @kingjs/case-at

    Weekly Downloads

    0

    Version

    1.0.5

    License

    MIT

    Unpacked Size

    4.25 kB

    Total Files

    4

    Last publish

    Collaborators

    • kingces95