Further Market
  • Essentials

    • Foreword
    • What is FM Script ?
    • The philosophy and benefits of FmScript
    • What you will learn
  • Recall

    • Internet: who? what? What is that?
    • Further market and FMScript
    • The compiler
  • Download
  • Getting started

    • Installation
    • Create a business account
    • Connect to the PC application
    • Create your first applet
    • Create your first web applet
    • Compiler view
  • Basics

    • basic rules
    • Reserved keywords
    • The Syntax
    • Coding Style
    • comments
    • Variables, constants, and data types
    • Convertion of types
    • Conditions and loops
  • Functions

    • Create a Menu
    • Create input field (Input2)
    • Create a QR Code
    • Scan a QR Code
    • Strings functions
    • Array functions
    • Date Time functions
    • Mathematics functions
    • JSON functions
    • XML functions
    • Call Http request
    • Manipulate Sessions
    • Financial functions
    • Notifications
    • Bleutooth Printer
  • Demos

    • Advanced Inputs
    • Call http Request
    • loops and conditions
    • Menu inputs
    • Array items count
    • Simpe for
    • simple select count Sql Query
    • Date and Time picker form
    • Get credit balance
    • is valid city
    • user info from phone number
    • get country and city from form
    • simple ussd link switch
    • charge user credit
    • simple message box
    • user entry code
    • get users relations
    • my external payements collected
    • call google Map
    • in App direct publish
    • Geo location
    • Charts
    • menu with hints
    • call system Messenger
    • user start code
    • In call Gallery
    • credit card payment Request
    • MTN CMR Airtime Product Subscription
    • MenuItemAddContacts
    • AJax and FM Input
    • Input2
    • MenuItemAddRichMedias
    • MenuItemAddTagsItems2
    • BlinBlin Menu + javascript
    • GENERAL ALERT MESSAGE WITH JSON OPTIONS
    • Barcode
  • databases

    • CRM
    • External Payments
    • Bills
    • Sales
    • Games
    • Applets
    • Payments Gateway
    • Manipulate Select Queries
  • APIs

    • Further Markey Pay button integration
    • Mobile Money cash collector
    • Bill Api
    • API PUBLISH PRODUCT
    • Sale Api
    • SMS Api
  • Advanced

    • Actions scheduler
    • Events settings
  • USSD CAMEROON

functions of manipulation of the string

  • CreateStrID : Create a Unique string Identifier
  • Copy
  • Length
  • LeftStr
  • RightStr
  • LowerCase
  • UpperCase
  • UpperCaseFirst
  • MinifyString
  • QuotedStr
  • Trim
  • SlashBackward and SlashForward
  • USSDStringFilter
  • UTF8ToString
  • URLEncode
  • URLDecode
  • FormatFloat

In this section, we will describe some of functions used to manipulate strings on FMScript.

CreateStrID : Create a Unique string Identifier

This function generate a unique ID. two simultaneous calls of the same functions in your will return almost different values

Demo : Generate two Strings ID at the same time

            
var Result : String;

Result := 'Str 1 = ' + CreateStrID + LINEBREAK + 'Str 2 = ' + CreateStrID;         
Exit; 
            
        

Copy

copy a sub string in a chain. It takes in parameter a string (Str), the index of beginning of the copy (StartIndex), as well as the number of characters to copy in the String(NbCharacters)

Signature

            
Copy(Str : String, StartIndex : Integer, NbCharacters : Integer);
            
        

Demo
            
var Result : String; 
                       
Result := Copy('Hello FM Community', 6, 15);         
Exit; 
            
        

This above demo will return automatically FM Community

Length

returns the size of a text passed as a parameter

Signature

            
Length(Value : String); 
            
        

Demo
            
var Result : String; 
                       
Result := Copy('Hello FM Community', 6, 15); 

ShowMessage(Length(Result));
Exit;                                         
            
        

This above demo shows 13, as length of the string returned by the Copy function

LeftStr

Returns 'ACount' most Left caracters of 'AStr'

Signature

            
LeftStr(AStr : String, ACount : Integer);  
            
        

Demo
            
var Result : String; 
                       
Result := '1 row inserted'; 
 
IF LeftStr(Result, 1) <> '1' THEN
(
  ShowMessage('Failed');
  Exit;
);  

ShowMessage('Succeed');
Exit;                             
            
        

This above demo shows Succeed

RightStr

Returns 'ACount' most Right caracters of 'AStr'

Signature

            
RightStr(AStr : String, ACount : Integer); 
            
        

LowerCase

Convert all caracters of AString to their corresponding LowerCase Value

Signature

            
LowerCase(AString : String); 
            
        

UpperCase

Convert all caracters of AString to their corresponding UpperCase Value

Signature

            
UpperCase(AString : String); 
            
        

UpperCaseFirst

Convert only 1st caracter of AString to it corresponding Uppercase Value

Signature

            
UpperCaseFirst(AString : String); 
            
        

MinifyString

Minify string like javascript or css code

Signature

            
MinifyString(AString : String);      
            
        

QuotedStr

Returns Quoted string of 'AStr'

Signature

            
QuotedStr(AStr : String);      
            
        

Trim

Return a string value with edge spaces removed

Signature

            
Trim(Value : String);          
            
        

SlashBackward and SlashForward

Return respectively Slash Backward and Slash Forward string

USSDStringFilter

convert caracters of to their corresponding USSD String Value

Signature

            
USSDStringFilter(Value : String);          
            
        

UTF8ToString

Decode a UTF8 string.

Signature

            
UTF8ToString(Value : String);          
            
        

URLEncode

Encode Astring to make it compatible for get method.

Signature

            
URLEncode(Value : String);          
            
        

URLDecode

Decode and encoded Astring.

Signature

            
URLDecode(Value : String);          
            
        

FormatFloat

Mostly used to display prices.

Signature

            
FormatFloat(Format : String, Extended : Double);   
            
        

Demo
            
var Result : String; 
var Amount : String; 

Amount := 20000;                       
Result := FormatFloat('#,##0.00', Amount); 

ShowMessage(Result);
Exit;      
            
        

This above demo shows 20 000,00

Scan QR Code
Arrays functions


Our Partners

Support
      Telephone : (+237) 675979899 / 676009100
      Email : fm_support@f-m.fm
      P.O Box : 774 BAFOUSSAM
Available On

no
no

Further Market Inc
Copyright © 2012-2021.