remove last word

This commit is contained in:
Victor Batischev
2024-02-28 19:44:12 +03:00
parent 3a0426ae6d
commit ce775e03ab
7 changed files with 24 additions and 20 deletions

View File

@ -91,3 +91,8 @@ export function copyProjectLink(projectId) {
`https://itguild.info/tracker/project/${projectId}`
);
}
export function removeLast(string) {
let lastIndex = string.lastIndexOf(" ");
return string.substring(0, lastIndex);
}