Remove first and last characters from string in bash

Let's supoose that we have a string:

$ string="0123456789"
Remove first 2 characters:
$ echo ${string:2}
23456789
$ echo ${string#??}
23456789
$ sed 's/^.\{2\}//' <<< $string
23456789
$ awk '{gsub(/^.{2}/,"");}1' <<< $string
23456789
$ cut -c3- <<< $string
23456789
Remove last 2 characters:
$ echo ${string::-2}
01234567
$ echo ${string%??}
01234567
$ echo ${string:0:${#string}-2}
01234567
$ sed 's/.\{2\}$//' <<< $string
01234567
$ awk '{gsub(/.{2}$/,"");}1' <<< $string
01234567
$ echo -n $string | head -c -2
01234567
Keep only middle of string - remove 24 first and last characters:
$ echo ${string:2:-2}
234567