Deutsch English
Alphabetical index
Array functions
CGI functions
Data types
Date functions
Debugging
Fulltext functions
Language elements
Numerical functions
Operators
Other functions
Ramtext functions
Selecting
Socket functions
Statistical functions
Stream functions
String functions
  • ansitooem()
  • asc()
  • chr()
  • decodeb64()
  • digitstr()
  • encodeb64()
  • exchange()
  • extnote()
  • fillstr()
  • groß()
  • isnumber()
  • klein()
  • länge()
  • leftstr()
  • length()
  • links()
  • lower()
  • ltrim()
  • makepw()
  • ntimes()
  • oemtoansi()
  • pos()
  • rechts()
  • rightstr()
  • rtrim()
  • scan()
  • soundex()
  • stradd()
  • strcomp()
  • subpath()
  • swap()
  • testln()
  • testpw()
  • tohtml()
  • upper()
  • valstr()
    System functions
    Table functions
    Text functions
    Home    Overview    Search    Impressum    Contact    Members
    Topic complex String functions
    Function strcomp()
    Short compares two strings
    Syntax STRCOMP(s1, s2 : STRING) : REAL
    Parameter s1, s2 : any strings
    Return 0 : s1 and s2 are totally different
    1 : s1 and s2 are equal (case-insensive)
    otherwise a "value of similarity" of both strings
    See also:
    LIKE soundex()
    Description Returns a relative comparison of two strings. The result is 0 if both strings are different in every character and 1 if they are absolutely equal. In every other case a value between those is arisen which is the higher the more fragments of one string can be found in the other one. The exact formel is:

    StrComp(S1,S2) = 2*n/(Length(S1)+Length(S2))
    whereas n is the number of equal charakters (directed from left to right).
    String1         String2          same charakters  StrComp
    ---------------------------------------------------------
    Hinterhuber     Einmeier               5             0.53
     ^^ ^    ^^      ^^ ^ ^^
    Sindelfingen    Sindlefingen          11             0.92
    ^^^^ ^^^^^^^    ^^^^^ ^^^^^^
    Huberstraße     Albertusstr            6             0.55
      ^^^^^^          ^^^   ^^^
    

    This function is very well qualified to find the most similar string to an other in a table.

    User comments:
    Write a comment:
    Name
    EMail
    Subject
    Text (Switch mode)

    Choose between
    the normal and the
    advanced editor.
    The advanced editor
    runs in IE 5+ and
    Mozilla 1.4+ only
    SPAM-Protection Please enter tdbengine in this field.

    tdbengine chat
    irc.tdbengine.org
    #tdbengine

       Copyright © 2003-2004 tdb Software Service GmbH
       Alle rechte vorbehalten. / All rights reserved
       Last changed: 21.10.2004
    {Fehler für :execmacro{execmacro="sessionspy"}