
-- "aaa dog bbb dog ccc cat "
put getposition()
-- 16
ReplaceAll(sourceString,replaceString,findString) - where sourceString is the string to search in,
replaceString is the string to replace the found string with and findString is the string to look for.
Returns a copy of the source string modified by the replace operation or "" if there was an error.
Finds all occurrences of findString in sourceString and replaces each occurrence with
replaceString. Not affected by SetPosition. Always searches from character 1 of sourceString.
Does not affect current position.
Example 1:
set source = "aaa cat bbb cat ccc cat "
set source = ReplaceAll(source,"dog","cat")
put source
-- "aaa dog bbb dog ccc dog "
Example 2:
on fixLineEndings convertToWhichType
-- Converts Mac format text file to PC or
-- PC to Mac. Utility handler. No error
-- checking built in.
--
-- EX: fixLineEndings("PC")
-- Converts Mac file to PC format. Prompts
-- for file to convert.
Online Help
32
Komentáře k této Příručce