Skip to content

str[0]-->str.charAt(0), for ie7 #28

@Kirk-Wang

Description

@Kirk-Wang

function capitalize(str: string, i: number): string {
if (i === 0) {
return str;
}

return str[0].toUpperCase() + str.slice(1);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions