juneau-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] jamesbognar closed pull request #18: Add new vars to svl example
Date Tue, 20 Nov 2018 13:36:26 GMT
jamesbognar closed pull request #18: Add new vars to svl example
URL: https://github.com/apache/juneau/pull/18
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/svl/SvlExample.java
b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/svl/SvlExample.java
index 3c08fb579..b73b4bbe5 100644
--- a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/svl/SvlExample.java
+++ b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/svl/SvlExample.java
@@ -48,9 +48,18 @@ public static void main(String[] args) {
 		// $UC{arg} uppercase $LC{arg} lowecase
 		System.out.println(vr.resolve("$LC{JAVA_HOME} $UC{$E{JAVA_HOME}}"));
 		
+		// $LN{arg[,delimiter]} length var example
+		System.out.println(vr.resolve("parts = $LN{$S{os.version},.}, charcount = $LN{$S{os.version}}"));
+		
+		// $ST{arg,start[,end]} substring var example
+		System.out.println(vr.resolve("version = $ST{$S{java.version}, 0, 3}"));
+		
+		// $PE{arg,start[,end]} pattern extractor var example
+		System.out.println(vr.resolve("update = $PE{$S{java.version},_([0-9]+),1}"));
+		
 		/*
 		 *  See all supported variable types at,
-		 *  http://juneau.apache.org/site/apidocs-7.2.1/overview-summary.html#juneau-svl
+		 *  http://juneau.apache.org/site/apidocs-8.0.0/overview-summary.html#juneau-svl
 		 *  NOTE - juneau-svl supports nested variables well
 		 * */
 	}


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message