Add slice-text function.