Re: Simple String question
- To: mathgroup at smc.vnet.net
- Subject: [mg110718] Re: Simple String question
- From: Dimitris Emmanoulopoulos <demmanoulopoulos at hotmail.com>
- Date: Sat, 3 Jul 2010 08:18:06 -0400 (EDT)
Dear Steve This is a potential way to do it orderingstring[x_] := StringReplace[ StringTake[ ToString[ Sort[Map[FromDigits, ToExpression[ Map[Sort, StringCases[StringSplit[x], DigitCharacter]]]]]], {2, -2}], "," -> ""] orderstring[foo] 157 236 I am pretty sure that "sorter solutions" are going to be posted :-) Dimitris