← 返回函数库

endsWith

String 内置函数 已实现

语法

endsWith(...)

示例

attr x = endsWith(...)

🎨 3D 预览 — 字符串后缀判断

@StartRule
Lot --> primitiveCube(4, 4, 4)
        case endsWith("hello.jpg", ".jpg") : color(0.2, 0.8, 0.4)
        else : color(0.8, 0.2, 0.2)