Perl, 88 bytes
@_=/./g;a:{for(0..@_-2){@_[$_,$_+1]=@_[$_+1,$_],redo a if uc$_[$_]gt uc$_[$_+1]}}print@_
Just a simple Bubble Sort. Call with -n option to pass the text.
e.g:
echo "tThHiIsS" | perl -n sort2.pl
Output:
hHiIsStT
samgak
- 1.7k
- 15
- 25