An open API service indexing awesome lists of open source software.

https://github.com/retraigo/locate

Locate the nth character in a string.
https://github.com/retraigo/locate

Last synced: 3 months ago
JSON representation

Locate the nth character in a string.

Awesome Lists containing this project

README

        

# locate
Locate the nth character in a string.

```ts
import { locate } from "https://deno.land/x/locate/mod.ts";

const template =
`xue hua piao piao
bei feng xiao xiao`

console.log(locate(template, 21));
// { line: 1, column: 2 }
```