Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/retraigo/locate

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

Last synced: 8 days 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 }
```