Re: Compare two strings with same characters, but different order.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Bob Phillips (bob.phillips_at_notheretiscali.co.uk)
Date: 03/23/04


Date: Tue, 23 Mar 2004 13:07:27 -0000

What is wrong with

    if str1 <> str2 then
        'do something

-- 
HTH
Bob Phillips
    ... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"chris" <anonymous@discussions.microsoft.com> wrote in message
news:F2369166-17D0-4323-A0B8-B3801C551B6D@microsoft.com...
> I am looking to see if there is a quick and dirty function to compare Two
strings with all the same characters but different order of charactrers.  I
don't think i can resort to a simple ascii value because the numerical value
of two different strings might add up to the same value.
>  example:  cat = atc


Relevant Pages

  • Re: Why R6RS is controversial
    ... the semantics of the language, ... behavior of grapheme-cluster characters under most linguistic ... as the strings grow longer. ... Normalization is hideously complicated, and may require many ...
    (comp.lang.scheme)
  • Re: Unicode LISP??
    ... I'm not experienced with Common Lisp library, ... terms of strings rather than characters. ... have their representation upgraded if they are updated in place. ...
    (comp.lang.lisp)
  • Re: ATWT - Leaving? (re: SPOILERS FOR THE WEEK OF JUNE 30th)
    ... Is Chris leaving the show? ... squandering the children of the veteran characters, ... Cyrus caught him with Daisy, and much longer for Cassie to find out, ... confront Cyrus, get Daisy to hide him and steal from her family, sleep ...
    (rec.arts.tv.soaps.cbs)
  • Re: not quite 1252
    ... The kill_gremlins function is intended to fix Unicode strings that have been obtained by decoding 8-bit strings using 'latin1' instead of 'cp1252'. ... In fact it wasn't, it was UTF-8 like Sergei wrote, but it was easy to convert it to cp1252, no problem. ... characters to documents marked up as ISO 8859-1 or other encodings. ...
    (comp.lang.python)
  • Re: How to check variables for uniqueness ?
    ... FI in English typography), so the correct uppercase version of those ... characters is the sequence SS. ... So you at least agree with me that it should be consistent with toUpperCase -- all strings should have a single canonical toUpperCase, a single canonical toLowerCase, both should define equivalence classes on the mixed-case input strings, these should be the SAME equivalence class, and equalsIgnoreCase should implement and embody the corresponding equivalence relation. ... The version that doesn't shouldn't surprise English speakers; the version that does shouldn't surprise anyone familiar with its locale-specific behavior for the locale actually used. ...
    (comp.lang.java.programmer)