groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel.Sun" <sun...@apache.org>
Subject About adding DGM startsWith(String...) and endsWith(String...)
Date Sun, 31 Dec 2017 12:24:44 GMT
Hi all,

      I am going to add startsWith(String...) and endsWith(String...) for
java.lang.String(i.e. if and only if the string starts with/ends with any
specified strings, return true), because many senarios require them. For
example:

The following code
   
https://github.com/apache/groovy/blob/master/gradle/assemble.gradle#L352-L355
can be simplified as
    it.file.name.startsWith('asm-', 'antlr-', 'antlr4-')

    The similar senario appears at:
https://github.com/apache/groovy/blob/master/gradle/assemble.gradle#L366-L369

    Any thoughts?

Cheers,
Daniel.Sun



--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html

Mime
View raw message