FILEFLEX API REFERENCE



NAME
DBTranslateChars -- Translate a character string

SYNTAX
DBTranslateChars(string,translation-table)

CATEGORY
Character Translation

DESCRIPTION
You can use FileFlex to translate character sets within a text container using the DBTranslateChars function. DBTranslateChars takes two parameters: the string to be translated and the pre-built translation table. It returns the translated string.

To use FileFlex character-level translation, you develop a translation table that describes the new and old values and pass it to FileFlex along with a container of characters to be translated.

Setting up a character translation table is very straightforward. You need to build a string consisting of 256 characters. The position in the string is the value of the old character and the value at that position becomes the new character.

Note: The first character in the string is considered "position 0" by FileFlex. Also note that you cannot place a 0 into any character position. If you do not want translation, place the corresponding character value into that position or the value 255.


EXAMPLE
on mouseUp
  global CaseReverseX
    
  buildTranslateTable_CaseReverseX
  put DBTranslateChars(field "text data",CaseReverseX) into field "text data"
end mouseUp

SEE ALSO
DBUpper, DBLower

INTERNAL FUNCTION NUMBER
48


Copyright © 1992-1998 by David Gewirtz, under license to Component Enterprises, Inc.
Contact: info@component-net.com

Casa de Bender