startsWith

Test if 'value' starts with 'search'

Install

Install all functions of strman

yarn add strman

or just the startsWith function

yarn add strman.startswith

Usage

import { startsWith } from 'strman'
// OR
import startsWith from 'strman.startswith'
Parameters:
Name Type Attributes Default Description
value String

The String!

search String

Value to search.

position Number <optional>
0

offset to search.

caseSensitive Boolean <optional>
true

if you use caseSensitive to test.

Source:
Returns:

If 'value' startsWith 'search' return true, else false.

Type
Boolean
Example
startsWith('strman', 'str')
// => true