美文网首页
makefile之strip函数

makefile之strip函数

作者: frank_545b | 来源:发表于2018-09-17 15:56 被阅读0次
#$(strip <string> )
#名称:去空格函数——strip。
#功能:去掉<string>字串中开头和结尾的空字符,并将中间的多个连续空字符(如果有的话)合并为一个空字符。
#返回:返回被去掉空格的字符串值。
#说明: 空字符包括 空格,tab等不可显示的字符

#把字串" abc"开头的空格去掉,结果是"abc"。
str1 :=    abc
str2 := abc      
str3 := a   b  c      

all:
    @echo bound$(strip $(str1))bound
    @echo bound$(strip $(str2))bound
    @echo bound$(strip $(str3))bound

相关文章

网友评论

      本文标题:makefile之strip函数

      本文链接:https://www.haomeiwen.com/subject/wefrnftx.html