【问题标题】:How to convert a string to camel case in Mule 4如何在 Mule 4 中将字符串转换为驼峰式大小写
【发布时间】:2019-05-30 16:42:00
【问题描述】:

在 Mule 4 应用程序中是否有任何函数可以将字符串 ex: "iamhuman" 转换为驼峰式 "iAmHuman"。

【问题讨论】:

    标签: mule mule-studio mule-esb mulesoft mule4


    【解决方案1】:

    您可以在 dataweave 中使用 camelize 函数。 它将与您的示例一起使用,因为它不知道单词中断的位置。如果您有另一个分隔符,例如下划线或连字符,那么这将起作用:

    %dw 2.0
    import * from dw::core::Strings
    output application/json
    ---
    { "camelize" : camelize("i_am_human") }
    

    【讨论】:

      猜你喜欢
      • 2011-02-27
      • 1970-01-01
      • 1970-01-01
      • 2018-12-18
      • 2017-07-28
      • 2014-10-30
      • 1970-01-01
      • 2018-05-29
      相关资源
      最近更新 更多