1 / 7

Custom String Plugin for Grails

Grails is a set of Groovy based Domain Specific Languages (DSL) that are used to create and configure a traditional Spring hibernate application from Java.<br><br>https://www.ongraph.com/custom-string-plugin-for-grails/

Download Presentation

Custom String Plugin for Grails

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Custom String Plugin for Grails

  2. This plugin adds few custom methods to String class: 1. trunc() to truncate a string to some length. 2. ellipsis() to add “…” after the truncation. 3. clean() to clean the string content. It normalize all special characters and remove non-text inputs.

  3. Installation: Download and extract the zip. Go to the root of the plugin, and run grails maven-install (from release plugin) which would build the plugin artifact for you in you local maven repository if you have one setup. Now just add the following in yourBuildConfig.groovy plugins{ ... runtime ":custom-string:0.1" ... }

  4. Usage: 1) trunc(int sizeOfString): "This is a custom method to truncate the string to given size".trunc(20) //Output: This is a custom met

  5. 2) ellipsis(int sizeOfString): "This is a custom method to truncate the string to given size".ellipsis(23) //Output: This is a custom met...

  6. 3) clean():This methods is very helpful when user copy/paste text from MS word/excel or some other editor which can have non text inputs. : String input = "Tĥïŝ ĩš â fůňķŷ Šťŕĭńġ."; input += "•\tIt will remove all the non text inputs.•\tIt will fill spaces with non text inputs o\t. o\t".clean() //Output: This is a funky String. It will remove all the non text inputs. It will fill spaces with non text inputs .

  7. Thank You For Watching Connect With This For More Info^ http://bit.ly/2SWA4qg Call Us:- 1-800-270-1893

More Related