Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WBRIDGE and version 24.0
Div
Classe2e-refDiv

Otp
Floatingfalse

Rp

The Bridge supports string manipulation operations. These operations are offered by the String class:

Children Display

Internally, strings are represented as UTF-8 strings.

Multiexcerpt include
MultiExcerptNamestring
nopaneltrue
PageWithExcerptINTERNAL:_examples_BRIDGE

Escaping Characters

String literals are created by putting character sequences into single ('…') or double quotes ("…"). If the string literal contains double quotes, they can be used without escaping if the literal is enclosed by single quotes and vice versa:

"myString'StringWithinQuotes'end" or 'myString"StringWithinDoubleQuotes"end'

An alternative to have quotes within a string is escaping the quotes with a backslash ( \" or \' ):

"myString\"StringWithinDoubleQuotes\"end" or 'myString\'StringWithinDoubleQuotes\'end'

Another backslash character is quoting the backslash character itself ( \\ ).

The following sections explain the various String operations.

Note
iconfalse

If you want to use white spaces like tabs, new lines, or carriage returns in a string, use the text() macro described in Text Macro.

UML Examples

Example of Basic String Operations

Multiexcerpt include
MultiExcerptNamestring
nopaneltrue
PageWithExcerptINTERNAL:_examples_BRIDGE

Figure String Manipulation Operations shows several examples of string manipulations with the Bridge.

Figure: String Manipulation Operations

Image Modified

If you used the following input in Figure Input Values of the String Example for the example above, you would receive the output shown in Figure Response of the String Example.

Figure: Input Values of the String Example

Image Modified

Running a test case with these input values would result in the following output.

Figure: Response of the String Example

Image Modified

Note
iconfalse

The value of attribute whitespaceString in figure Response of the String Example is displayed in one line on the Response tab of the E2E SOAP Test Tool. Actually, there is a line break before the text second line, which would be visible when browsing the runtime values on the UML tab of the SOAP Test Tool.

Type Converter Operations

Multiexcerpt include
MultiExcerptNameconverter
nopaneltrue
PageWithExcerptINTERNAL:_examples_BRIDGE

The example in figure Type Converter Operations shows the use of converter operations.

Figure:Type Converter Operations

Image Modified

Note
iconfalse

A blob as used by the Bridge is internally encoded as base64Binary. This means that in order to read anything out of a blob from a frontend (client) or backend, you first need to decode it (see Blob Operations). To use the information in the blob, you need to know what format it is (e.g. html, xml, gif, string, etc.). There is only one exception: when the backend understands base64Binary (for instance SOAP services), you do not have to decode it.

Panel
titleOn this Page:
Table of Contents
Panel
titleRelated Pages: