Articles

[Collapse]TestComplete/viewarticle/63445/
 [Expand]General Information/viewarticle/63445/
 [Expand]Using Help System/viewarticle/55799/
 [Expand]Getting Started Tutorial/viewarticle/56246/
 [Expand]Using TestComplete/viewarticle/57875/
 [Expand]Testing Types/viewarticle/62721/
 [Expand]Applications Testing/viewarticle/62606/
 [Expand]Working With Application Objects and Controls/viewarticle/55815/
 [Expand]Samples and Tutorials/viewarticle/56239/
 [Collapse]References/viewarticle/57878/
  [Expand]Test Objects/viewarticle/57881/
  [Collapse]Scripting Objects/viewarticle/57882/
   [Collapse]A
    [Expand]ADO/viewarticle/55372/
    [Expand]ADODriver/viewarticle/58932/
    [Expand]aqBinaryFile/viewarticle/55629/
    [Expand]aqConvert/viewarticle/55352/
    [Expand]aqDateTime/viewarticle/55342/
    [Expand]aqDriveInfo/viewarticle/59323/
    [Expand]aqEnvironment/viewarticle/55346/
    [Expand]aqFile/viewarticle/55351/
    [Expand]aqFileCertificateInfo/viewarticle/59358/
    [Expand]aqFileInfo/viewarticle/55419/
    [Expand]aqFileSystem/viewarticle/55345/
    [Expand]aqFileVersionInfo/viewarticle/59295/
    [Expand]aqFolderInfo/viewarticle/55571/
    [Expand]aqObject/viewarticle/55360/
    [Expand]aqObjEvent/viewarticle/58410/
    [Expand]aqObjField/viewarticle/58420/
    [Expand]aqObjIterator/viewarticle/58407/
    [Expand]aqObjMethod/viewarticle/58416/
    [Expand]aqObjProperty/viewarticle/55781/
    [Expand]aqString/viewarticle/55359/
    [Expand]aqTextFile/viewarticle/56875/
    [Expand]AQtime/viewarticle/55153/
    [Expand]AQtimeIntegration/viewarticle/55042/
    [Expand]aqUtils/viewarticle/55373/
   [Expand]B
   [Expand]C
   [Expand]E
   [Expand]D
   [Expand]F
   [Expand]H
   [Expand]I
   [Expand]O
   [Expand]P
   [Expand]R
   [Expand]S
   [Expand]T
   [Expand]U
   [Expand]W
   [Expand]V
   [Expand]Obsolete Objects
  [Expand]Project and Project Item Objects/viewarticle/57880/
  [Expand]TestComplete Events/viewarticle/56945/
  [Expand]Language Reference/viewarticle/57879/
  [Expand]User Form Components/viewarticle/56689/
 [Expand]Other Tools That Help You Test Better/viewarticle/63442/
 [Expand]TestComplete 10 Licensing Guide/viewarticle/63451/
Updated: 9/23/2014 Applies To: TestComplete 10 Rating: No votes Click to rate: PoorNot badAverageGoodExcellent
Programming Reference

aqString Object

Description

The aqString object lets you perform various operations on string values.

Members

Example

The code below divides the specified string into characters and posts them to the test log.

VBScript

Sub StringByLetter
  Dim aString, i
  
  ' Specifies the string
  aString = "Per aspera ad astra"
  Log.Message("The string is : " & aString)
  Log.Message("And now, this text letter by letter using the GetChar method:")
  
  ' Posts the specified string letter by letter to the test log
  For i = 0 To aqString.GetLength(aString)-1
    Log.Message(aqString.GetChar(aString, i))
  Next
  
End Sub

JScript

function StringByLetter()
{
  
  // Specifies the string
  var aString = "Per aspera ad astra";
  Log.Message("The string is : " + aString);
  Log.Message("And now, this text letter by letter using the GetChar method:");
  
  // Posts the specified string letter by letter to the test log
  for (var i = 0; i < aqString.GetLength(aString); i++)
    Log.Message(aqString.GetChar(aString, i));
  
}

DelphiScript

function StringByLetter;
var aString, i;
begin

  // Specifies the string
  aString := 'Per aspera ad astra';
  Log.Message('The string is : ' + aString);
  Log.Message('And now, this text letter by letter using the GetChar method:');
  
  // Posts the specified string letter by letter to the test log
  for i := 0 to aqString.GetLength(aString)-1 do
    Log.Message(aqString.GetChar(aString, i));
  
end;

C++Script, C#Script

function StringByLetter()
{
  
  // Specifies the string
  var aString = "Per aspera ad astra";
  Log["Message"]("The string is : " + aString);
  Log["Message"]("And now, this text letter by letter using the GetChar method:");
  
  // Posts the specified string letter by letter to the test log
  for (var i = 0; i < aqString["GetLength"](aString); i++)
    Log["Message"]( aqString["GetChar"](aString, i) );
  
}

See also
Working With Strings | TestComplete Helper Objects | aqConvert Object | aqDateTime Object | aqEnvironment Object | aqFile Object | aqFileSystem Object | aqObject Object | aqUtils Object


© 2014 SmartBear Software. All rights reserved.
Email Send feedback on this document