Assuming var contains spaces, newlines, and tabs followed by some text,
why does
${var#"${var%%[![:space:]]*}"} # strip var of everything
# but whitespace
# then remove what's left
# (i.e. the whitespace) from var
remove the white space and leave the text but
${var##[:space:]*} # strip all whitespace from var
doesn't?