Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Left – PB Docs 126 – PowerBuilder Library

Left – PB Docs 126

Left PowerScript function

Description

Obtains a specified number of
characters from the beginning of a string.

Syntax

Argument

Description

string

The string you want to search

n

A long specifying the number of characters
you want to return

Return Values

String. Returns the leftmost n characters
in string if it succeeds and the empty string
(“”) if an error occurs. If any argument’s value is null, Left returns null.
If n is greater than or equal to the length
of the string, Left returns the entire string. It
does not add spaces to make the return value’s length equal
to n.

Examples

This statement returns BABE:

This statement returns BABE RUTH:

These statements store the first 40 characters of
the text in the SingleLineEdit sle_address in emp_address:

For sample code that uses Left to parse
two tab-separated values, see the Pos function.

See Also

  • Mid

  • Pos

  • Right

  • Left method for DataWindows
    in the DataWindow Reference or the online Help


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x