434
export function mnemonicButtonLabel(label: string, forceDisableMnemonics?: false): { readonly withMnemonic: string; readonly withoutMnemonic: string };
435
export function mnemonicButtonLabel(label: string, forceDisableMnemonics?: boolean): { readonly withMnemonic: string; readonly withoutMnemonic: string } | string {
436
>
const withoutMnemonic = label.replace(/\(&&\w\)|&&/g, '');
labels.ts
437
>
438
>
if (forceDisableMnemonics) {
439
return withoutMnemonic;
440
}
442
return { withMnemonic: withoutMnemonic, withoutMnemonic };
443
}
445
>
let withMnemonic: string;
446
>
if (isWindows) {
447
withMnemonic = label.replace(/&&|&/g, m => m === '&' ? '&&' : '&');
449
>
withMnemonic = label.replace(/&&/g, '_');
450
>
}
451
>
return { withMnemonic, withoutMnemonic };
452
>
}
453
454
export function unmnemonicLabel(label: string): string {