Skip to main content
Skip table of contents

f$Replace (f$Ersetzen)


f$Replace (f$Ersetzen)

Replace all occurrences of text searched within an original text with a replacement text. The resulting text is returned.

The individual texts can consist of as many characters as desired, while an empty string (") can be entered for the replacement text. This function is case-sensitive.

This function should be used instead of the p$tdv:util:replace procedure.

Syntax:

NewText = f$Replace( Text, SeaText, ReplText )

 

Argument

Type

Meaning

 

Text

String

The text in which a replacement is to be made

 

SeaText

String

The text which is to be replaced

 

ReplText

String

The text which is to be inserted in the other's place

Result:

String

New compiled text

Examples:

Text = f$Replace( '3,14', ',', '.') → Text = '3.14'

Text = f$Replace( 'M 4 x 20', ' ','' ) → Text = 'M4x20'

  • Text = f$Trim (Text [,Option])

Option: 1 - left, 2- right , 3- both

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.