Function::String
StringFrom
StringFrom(String,StringToSearchfor)
StringFrom("My Test this is a Test string","Test") -- will return string as it search for the last occurrence.
retval := StringFrom(MyTextField,SearchFor) .
To return the remainder of a string after the search. Very useful for trimming file names from paths etc.
It search from the tail of the string i.e. right to left so will return everything after the last occurrence in the string seen from the left (normal direction).
Parameters
SearchString: String
String that will be searched.
StringToSearchFor:
The match we are looking for.
Returns/Result
String(255): Everything after StringToSearchFor but not inclusive. If no match return blank.
Examples
Example1:
StringFrom("C:\Users\Admin\Documents\Invoice.pdf","\")
This will return "Invoice.pdf" as it search right to left and will return everything after the last \ in the string.
Reference
On the forum about StringFrom
MemoWriteToFile(),MemoReadFromFile(),MemoStringFrom(), MemoStringBetween() sample
Download Sample
Seeing is believing, so please find attached a sample that showcase what you are looking for.
In this sample we...
Product: Dataease [{8}]FIVE. Written by DataEase 20/03/15 at 10:34:53
Re:MemoWriteToFile(),MemoReadFromFile(),MemoStringFrom(), MemoStringBetween() sample
Got some time to sit down to look at this example. Can't say much more than wow! ... Simple small scripts doing some clever stuff here, ans showing how to use functions to do the type of thing I'm looking for.Also showing off other things...
Product: Dataease [{8}]FIVE. Written by Simon B 23/03/15 at 12:13:11
Re:Re:MemoWriteToFile(),MemoReadFromFile(),MemoStringFrom(), MemoStringBetween() sample
We are glad that you are getting a glimpse of the sunny side of the DE8 coin.It is the biggest challenge for DE8 that it is deceptively similar to previous versions of DFW, when in reality it is a completely different beast altogether.<b...
Product: Dataease [{8}]FIVE. Written by DataEase 25/03/15 at 14:21:47
On the blog about StringFrom
New Function in 8 - StringFrom() - Search a string from the tail and return it. (Ver 8.0.0.1196)
This useful little function is part of a full set including StringTo() and StringBetween().StringFrom() search the input string from the tail end inwards looking for the search string. When it finds it, it returns the tail of the string up to...
Product: Dataease [{8}]FIVE. Written by DataEase 15/01/13 at 15:07:45
New Function in 8 - MemoStringFrom() - Copy the tail end of a Memo to a Target Memo (Ver. 8.0.0.1203)
This is the second of a triumvirate of Memo functions that directly correspond to the String(ToFromBetween) functions.MemoStringTo() Copies the content of a memo from the beginning up to SEARCH into a target Memo, and MemoStringFrom() copies t...
Product: Dataease [{8}]FIVE. Written by DataEase 17/01/13 at 17:34:28
MemoWriteToFile(),MemoReadFromFile(),MemoStringFrom(), MemoStringBetween() sample
Download Sample
Seeing is believing, so please find attached a sample that showcase what you are looking for.
In this sample we...
Product: Dataease [{8}]FIVE. Written by DataEase 20/03/15 at 10:47:00