1.0.1 • Published 5 years ago

@xin55/strstr v1.0.1

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

strstr practice

Description

練習使用 for loop 實現 strstr 方法

Usage

yarn add @xin55/strstr
import strstr from '@xin55/strstr'

expect(strstr('Function name is strstr', 'name')).toBe(9)
expect(strstr('Function name is strstr', 'Name')).toBe(-1)
expect(() => strstr('Function name is strstr')).toThrow(new Error('strstr should pass two string'))