mirror of
https://github.com/go-gitea/gitea.git
synced 2026-06-29 08:23:20 +00:00
5
web_src/js/utils/string.ts
Normal file
5
web_src/js/utils/string.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export function cutString(s: string, sep: string): [string, string, boolean] {
|
||||
const index = s.indexOf(sep);
|
||||
if (index === -1) return [s, '', false];
|
||||
return [s.substring(0, index), s.substring(index + sep.length), true];
|
||||
}
|
||||
Reference in New Issue
Block a user