MACROMEDIA DIRECTOR MX 2004-GETTING STARTED WITH DIRECTOR Manual de usuario Pagina 30

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 63
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 29
put source
-- "The suggested retail price for Microsoft Word is $299.00"
ReplaceFirst(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 the first occurrence of findString in the source string and replaces it with replaceString. Not
affected by SetPosition. Always searches from character 1 of sourceString. After ReplaceFirst the
current position is the characterposition after the end of the replaced string.
This command ignores the current case-sensitivity setting set by SetCaseSensitivity for
high-ASCII (above numtochar(125)) characters. For high-ASCII characters it is always
case-sensitive. See (deprecated in D11) for more information on case sensitivity.
Example 1:
set source = "aaabbb"
put replacefirst(source,"xxx","aaa")
-- "xxxbbb"
put getposition()
-- 4
Example 2:
on tabsToSpaces memName
-- Replace TAB indents at the beginnings of lines
-- with 5 spaces instead, in a text member
--
set temp = the text of member memName
set li = the number of lines of temp
repeat with x = 1 to li
Online Help
30
Vista de pagina 29
1 2 ... 25 26 27 28 29 30 31 32 33 34 35 ... 62 63

Comentarios a estos manuales

Sin comentarios