Previous Topic

Next Topic

QuotedString - MaxBasic Function

QuotedString(Expression: Variant[,Character:String]): String

Returns quoted string version of the given Expression.

QuotedString function has these named arguments:

Parameter

Description

Expression

Required. Expression to be converted to a quoted string.

Character

Quoting character, default value "

Note: For EDI Export only if Output is to Excel Worksheet QuotedString is automatically suppressed since it is not required.

Sample code:

S = "8" & """" & " pipe"

Quoted = QuotedString(S)

Dequoted = DequotedString(Quoted)

Print "S: " & S

Print "Quoted: " & Quoted

Print "Dequoted: " & Dequoted

Returns:

S: 8" pipe
Quoted: "8"" pipe"
Dequoted: 8" pipe

Sample code using character:

S = "8" & "'" & " pipe"

Quoted = QuotedString(S,"'")

Dequoted = DequotedString(Quoted,"'")

Print "S: " & S

Print "Quoted: " & Quoted

Print "Dequoted: " & Dequoted

Returns:

S: 8' pipe
Quoted: '8'' pipe'
Dequoted: 8' pipe

See Also

String Functions

Book Contents

Book Index