```ts

export function swapPair(first: string, second: string): string {
  return `${second}${first}`;
}

export function swapAll(text: string): string {
  let result = '';
  for (let i = 0; i < text.length; i += 2) {
    if (i + 1 < text.length) {
      result += `${text[i]}${text[i + 1]}`;
    } else {
      result += text[i];
    }
  }
  return result;
}
```