mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-01 05:51:32 +01:00
[html] Follow Link in Multi Root Workspace. Fixes #38469
This commit is contained in:
@@ -41,6 +41,17 @@ export function startsWith(haystack: string, needle: string): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function endsWith(haystack: string, needle: string): boolean {
|
||||
let diff = haystack.length - needle.length;
|
||||
if (diff > 0) {
|
||||
return haystack.indexOf(needle, diff) === diff;
|
||||
} else if (diff === 0) {
|
||||
return haystack === needle;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
export function repeat(value: string, count: number) {
|
||||
var s = '';
|
||||
while (count > 0) {
|
||||
|
||||
Reference in New Issue
Block a user