Brilliant Database Software - Home
Database software - Online Help System

Online Help System

Back to Brilliant Database Web-Site | Write to Support | Help Index



Text Opearations and Format

table border="0" width="100%" cellspacing="0" cellpadding="4" bgcolor="#00000077">
Formatting Text

Basic Information

To learn about how and where you can use formatting, see the Using Formatting section.

A formatting string is a set of flags separated with ";" that are successively applied to the initial value. For example, the next string will return the first word of the text in the upper case: text WORD0;UCASE;. See below more complicated examples.

List of Flags

In the given examples the string "Hello World!!!" is used as a text string by default.

Flag Name Description Example Format String Result

Main operations
UCASE Convert text to upper case text UCASE; HELLO WORLD!!!
LCASE Convert text to lower case text LCASE; hello world!!!
TRIM Delete leading spaces from the text text TRIM; Hello World!!!
CAPI Transform all first letters of word to the lower case text LCASE;CAPI; Hello World!!!

Getting different parts of text
LEFT(N) Show only the first N symbols (e.g. LEFT3) text LEFT3;
text LEFT7;
HEL
HELLO W
RIGHT(N) Show only the last N symbols (e.g. RIGHT5) text RIGHT1;
text RIGHT6;
!
rld!!!
SYMB(N)* Show the N symbol of the text; text SYMB0;
text SYMB1;
text SYMB6;SYMB7;
H
e
Wo
WORD(N)* Show the N word of the text text WORD0;
text WORD1;
Hello
World
LINE(N)* Show the N line of the text text LINE0;
text LINE1;
Hello World!!!
-

Search and replace
FROMstr Return text beginning with the first entry of the str text FROMll;
text FROMWorld;
o World!!!
!!!
UPTOstr Return text before the first entry of the str text UPTOll;
text UPTOWorld
He
Hello
REPMfind->replace Replace all find entries in the string with the specified replace. text REPMl->X;
text REPMWorld->;
text REPMHello->Welcome;
HeXXo WorXd...
Hello !!!
Welcome World!!!
REPOfind->replace Replace the first find entry in the string with the specified replace. text REPOl->X; HeXlo World!!!
NOTAGS Remove all html tags from the text (<a>,</b>, etc) text NOTAGS; Hello World!!!

Encrypting
CODE(N) Encrypt string with the XOR method. N - encryption offset. The given encrypting is symmetric, that is, if we use it twise, we will get the initial text. text CODE2;
text CODE3;
text CODE3;CODE3;
Jgnnm"Umpnf###
Kfool#Tlqog"""
Hello World!!!
MD5 Returns MD5 of a hash string. text MD5; 236BF30C70DC03F6
9175F030AFBE38F3

Bringing lines to the same length
The text "12.99" is used as an example. The given formatting is used for displaying data in the text format with a fixed data length.
LZRO(N) Adding zeros at the beginning of the text (leading zeros) for the length of the text to be equal to N. text LZRO10;
text LZRO6;
0000012.99
012.99
LSPC(N) Adding spaces at the beginning of the text (leading spaces) for the length of the text to be equal to N. text LSPC10;
text LSPC6;
_____12.99
_12.99
FSPC(N) Adding spaces at the end of the text for the length of the text to be equal to N. text FSPC10;
text FSPC6;
12.99_____
12.99_

Miscellaneous
FLDR In case the initial string is a file path, the given command will return a folder in which the file is located. Let's take c:\MyDocs\Doc1.doc as an example. text FLDR;
text FLDR;RIGHT-1;
c:\MyDocs\
c:\MyDocs
FILE In case the initial string is a file path, the given command will return a file name. Let's take c:\MyDocs\Doc1.doc as an example. text FLDR; Doc1.doc
TRIMW Deletes the last word from the text (everything after the last space).
Let's take Big green apple as an example.
text TRIMW; Big green
TRIMS Deletes the last unfinished sentence from the text (everything after the last character separating sentences). Let's take Big green apple. Very tasty as an example.
text TRIMS; Big green apple.

*When you use SYMB, WORD and LINE, a zero N value stands for the first character, first word and line respectively.

Examples of combining flags

Let's draw examples of using text formatting in text formuals. Assume that we have the [$a] variable that we process.

[$a] Value Text Formula Result
Hello World!!! [$a^text UCASE] HELLO WORLD!!!
Hello World!!! [$a^text UCASE;WORD0;] HELLO
Brining the first and the second name to the same view
john bull from UK [$a^text WORD1;CAPI] Bull
john bull from UK [$a^text TRIM;LEFT1;UCASE]. [$a^text WORD1;CAPI] J. Bull
THOMAS ANDERSON [$a^text TRIM;LEFT1;UCASE]. [$a^text WORD1;CAPI] T. Anderson
Retrieving a country
john bull from UK [$a^text FROMfrom;WORD0;LCASE] uk
Tom from Australia and John [$a^text FROMfrom;WORD0;LCASE] australia



All topics in the "Formatting Data" section: