Skip to content

STRTRAN

Replaces each occurrence of the specified character string with another character string. You can specify where the replacement begins and how many replacements are made.

Reporting Area(s)

General Student Manager and ACEweb

Required Parameters

  1. Expression/field to search (i.e. conoteprt, pcPayPrompt)
  2. Expression to search for (i.e. " : ", "credit card")
  3. Expression to replace every occurrence of the searched for expression specified in step 2 (i.e. " - ", "Visa or Master Card")

Optional Parameters

  1. Numeric return value: which occurence to replace
  2. Numeric return value: number of occurrences to replace

Example(s)

STRTRAN(conoteprt," : "," - ") replaces every occurence of [space]:[space] with [space]-[space]

STRTRAN(pcPayPrompt,"credit card","Visa or Master Card") replaces the words 'credit card' with 'Visa or Master Card' in the pay prompt message on ACEweb's individual course information page.

Notes

Standard FoxPro Function

SUBSTR