-- Find word in tab-delimited data record and
-- return data field containing word
--
set charPos = FindFirst(dataRecord,theWord)
if TC_GetLastError() = 0 then
set dataFieldNum = GetItemOfCharPosition(dataRecord,charPos,9)
if dataFieldNum > 0 then
set the itemDelimiter = numToChar(9)
return item dataFieldNum of dataRecord
else
return ""
end if
else
return TC_ErrorCodeToString(TC_GetLastError())
end if
end
REPLACE
The following commands find a specified character or string in text and replace it with another.
The original string remains unchanged. A copy of the string with the changes is returned. You
can perform multiple replaces on the same text by passing the return from one replace to the next
like so:
set source = "The SRP for MS Word is $299.00"
set source = ReplaceAll(source, "suggested retail price","SRP")
set source = ReplaceAll(source, "Microsoft","MS")
Online Help
29
Kommentare zu diesen Handbüchern