Home > Common Problem > What does str function mean?

What does str function mean?

hzc
Release: 2020-07-02 15:04:51
Original
13693 people have browsed it

In VB, you can use the "str()" function to convert numeric variables or constants into character variables or constants. This function is used to convert strings. Its syntax is "str(number)". The parameter number represents any valid numeric expression.

What does str function mean?

is a function in VB that can convert numeric variables or constants into character variables or constants.

Returns a Variant (String) representing a numerical value.

Str(number)

The necessary number parameter is a Long, which can contain any valid numerical expression.

When a number is converted into a string, a blank space is always left at the front to represent positive and negative. If number is positive, the returned string contains a leading space to imply a positive sign.

Use the Format function to convert values ​​into necessary formats, such as date, time, currency or other user-defined formats. Unlike Str , the Format function does not include leading spaces to place the sign of number .

Note that the Str function only treats periods (.) as valid decimal points. If you use a different decimal point (for example, international applications), you can use CStr to convert the number to a string.

The above is the detailed content of What does str function mean?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
str
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template