tencent cloud

Feedback

Function

Last updated: 2023-03-07 10:35:48

    Numeric functions

    FunctionFeatureSampleResult
    absReturns an absolute valueabs(-1024)1024
    ceilRounds upceil(5.1)6
    floorRounds downfloor(4.9)4
    logCalculates a logarithmlog(16, 2)4
    powCalculates an exponentpow(3,2)9
    maxReturns the maximum valuemax(12,54,3)54
    minReturns the minimum valuemin(12, 54, 3)3

    String functions

    FunctionFeatureSampleResult
    chompRemoves newline characters at the end of a stringchomp("hello\n")"hello"
    formatFormats a stringformat("Hello, %s!", "Ander")"Hello, Ander!"
    lowerConverts all cased letters in a string to lowercaselower("HELLO")"hello"
    upperConverts all cased letters in a string to uppercaseupper("hello")"HELLO"
    joinConcatenates elements of a string list with the given delimiterjoin(", ", ["foo", "bar", "baz"])"foo, bar, baz"
    replaceReplaces specified characters in a stringreplace("1 + 2 + 3", "+", "-")"1 - 2 - 3"

    For more information on functions, see Built-in Functions.

    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 avaliable.

    7x24 Phone Support