Sitemap Sitemap  |  Contact Us Contact Us  |  Clients Clients
   UCSearchLastSubstring
  Home |  WebHare Lite |  Downloads |  HareScript |  Websites/CMS |  Applications
Search for:  in: 
HareScript
General functions
 
Base functions
Cryptography APIs
Date and time manipulation
Developers support
Mathematic and floating point utility functions
Money type utility functions
UCSearchLastSubstring
  Find the last occurrence of a UTF-8 substring
 
Syntax PUBLIC INTEGER FUNCTION UCSearchLastSubstring (STRING text,STRING search,INTEGER start)
 
Description UCSearchLastSubstring does a case-sensitive search in a string for the last occurence of a substring.
 
Parameters
text String to search in
search String to search for
start The character position to start searching
 
Returns Starting character position of the last occurence, or -1 if the string was not found
 
Example
// returns 3
INTEGER example1 := UCSearchLastSubstring("aaaa", "a");

// returns 4
INTEGER example2 := UCSearchLastSubstring("ababab", "ab");

// returns -1
INTEGER example3 := UCSearchLastSubstring("abcdef", "g");

// returns -1
INTEGER example4 := UCSearchLastSubstring("abcdef", "A");

// returns 2
INTEGER example5 := UCSearchLastSubstring("ababab", "ab", 4);

// returns -1
INTEGER example6 := UCSearchLastSubstring("ababab", "ab", 0);
 
In library 'system'
Abort
Abs
AnyToString
Avg
BindSchemaToTable
BindTransactionToSchema
BindTransactionToTable
ByteToString
CellDelete
CellExists
CellInsert
CellUpdate
CollectGarbage
Count
DecodeBase16
DecodeBase64
DecodeCharSet
DecodeHTML
DecodeJava
DecodePacket
DecodeURL
DecodeValue
Detokenize
EncodeBase16
EncodeBase64
EncodeCharSet
EncodeHTML
EncodeJava
EncodePacket
EncodeURL
EncodeValue
ExtendObject
GetBestCharacterSet
GetBoundTransactionFromSchema
GetBoundTransactionFromTable
GetByteValue
GetCell
GetUCValue
GroupedValues
IsAtEndOfStream
IsPrintableASCII
IsPrivilegeGranted
IsTypeidArray
IsTypeidComparable
IsValidUTF8
Left
Length
MakeEmptyRecord
MakeObject
Max
MemberExists
Min
ObjectExists
Print
PrintRecordArrayTo
PrintRecordTo
PrintTo
Random
ReadFrom
ReadLineFrom
RecordExists
RedirectOutputTo
Right
SearchElement
SearchLastElement
SearchLastSubstring
SearchSubstring
SeedRandomizer
SendBlobTo
Substitute
Substring
Sum
ToInteger
Tokenize
ToLowercase
ToString
ToUppercase
TrimWhitespace
UCLeft
UCLength
UCRight
UCSearchLastSubstring
UCSearchSubstring
UCSubstring
UCToString
UCTruncate
UnpackRecord
WaitForMultiple
 
Top To top of page