aqString.Unquote Method

Applies to TestComplete 15.69, last modified on November 13, 2024

Description

The Unquote method returns the input string with no quotation marks at the beginning and at the end of the string. The quotation mark is specified by the QuoteSymbol property, its default value is a double quote ( " ).

Declaration

aqString.Unquote(InputString)

InputString [in]    Required    String    
Result String

Applies To

The method is applied to the following object:

Parameters

The method has the following parameter:

InputString

Specifies the string from which quotation marks should be removed.

Result Value

The unquoted version of the specified string.

Example

The code below unquotes the specified string and then posts this string to the test log.

JavaScript, JScript

function UnquoteDemo()
{
  var qStr = '"The string with some text."';
  // Posts the quoted string to the test log
  Log.Message(qStr);
  // Posts the unquoted string to the test log
  var Str = aqString.Unquote(qStr);
  Log.Message(Str);
}

Python

def UnquoteDemo():
  qStr = '"The string with some text."'
  # Posts the quoted string to the test log
  Log.Message(qStr)
  # Posts the unquoted string to the test log
  Str = aqString.Unquote(qStr)
  Log.Message(Str)

VBScript

Sub UnquoteDemo
  qStr = """The string with some text."""
  ' Posts the quoted string to the test log
  Log.Message(qStr)
  ' Posts the unquoted string to the test log
  Str = aqString.Unquote(qStr)
  Log.Message(Str)
End Sub

DelphiScript

function UnquoteDemo;
var qStr, Str;
begin
  qStr := '"The string with some text."';
  // Posts the quoted string to the test log
  Log.Message(qStr);
  // Posts the unquoted string to the test log
  Str := aqString.Unquote(qStr);
  Log.Message(Str);
end;

C++Script, C#Script

function UnquoteDemo()
{
  var qStr = '"The string with some text."';
  // Posts the quoted string to the test log
  Log["Message"](qStr);
  // Posts the unquoted string to the test log
  var Str = aqString["Unquote"](qStr);
  Log["Message"](Str);
}

See Also

Working With Strings
QuoteSymbol Property
Quote Method

Highlight search results