logo
  • 教程列表
  • SO官方文档
  • 字符串插值
    • 基本
    • 虚线表达
    • 渴望表达
    • 懒惰的表情
    • 表达
  1. StackOverflow 文档
  2. groovy 教程
  3. 字符串插值
  4. 渴望表达

渴望表达

Created: November-22, 2018

def str = 'old'
def interpolated = "I am the ${str} value"
assert interpolated == 'I am the old value'
str = 'new'
assert interpolated == 'I am the old value'
  • 懒惰的表情
  • 虚线表达

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明