tencent cloud

All product documents
Function
Last updated: 2024-12-02 16:01:33
Function
Last updated: 2024-12-02 16:01:33

Numeric functions

Function
Feature
Sample
Result
abs
Returns an absolute value
abs(-1024)
1024
ceil
Rounds up
ceil(5.1)
6
floor
Rounds down
floor(4.9)
4
log
Calculates a logarithm
log(16, 2)
4
pow
Calculates an exponent
pow(3,2)
9
max
Returns the maximum value
max(12,54,3)
54
min
Returns the minimum value
min(12, 54, 3)
3


String functions

Function
Feature
Sample
Result
chomp
Removes newline characters at the end of a string
chomp("hello\\n")
"hello"
format
Formats a string
format("Hello, %s!", "Ander")
"Hello, Ander!"
lower
Converts all cased letters in a string to lowercase
lower("HELLO")
"hello"
upper
Converts all cased letters in a string to uppercase
upper("hello")
"HELLO"
join
Concatenates elements of a string list with the given delimiter
join(", ", ["foo", "bar", "baz"])
"foo, bar, baz"
replace
Replaces specified characters in a string
replace("1 + 2 + 3", "+", "-")
"1 - 2 - 3"

For more information on functions, see Built-in Functions.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 available.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon