Sunday, November 18, 2018

execl函数使用记20181119


源数据:B1=projectname-android   或者projectname-ios

连接字符串
CONCATENATE(“https://cibuild.ysl.com/jenkins/job/“,B1)      # https://cibuild.ysl.com/jenkins/job/projectname-android

从某个字符截取
=MID(B1,FIND("-",B1),LEN(B1))     #输出:-android

连接字符串
=CONCATENATE("git", MID(B1,FIND("-",B1),LEN(B1)))     #输出:git-android

 替换字符
=SUBSTITUTE(B1, MID(B1,FIND("-",B1),LEN(B1)), CONCATENATE("git", MID(B1,FIND("-",B1),LEN(B1))) )      #输出:projectnamegit-android

继续拼接字符串
CONCATENATE(“https://cibuild.ysl.com/jenkins/job“, SUBSTITUTE(B1, MID(B1,FIND("-",B1),LEN(B1)), CONCATENATE("git", MID(B1,FIND("-",B1),LEN(B1))) ))

#输出: https://cibuild.ysl.com/jenkins/job/projectnamegit-android

No comments:

Post a Comment