MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

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


  • Prev by Date: Automatic numbering and table of contents
  • Next by Date: Re: plot
  • Previous by thread: Re: Simple String question
  • Next by thread: Re: Simple String question