{"id":20507260,"url":"https://github.com/rvenutolo/groovy-string-extensions","last_synced_at":"2025-08-09T15:11:15.591Z","repository":{"id":57741060,"uuid":"55916089","full_name":"rvenutolo/groovy-string-extensions","owner":"rvenutolo","description":"A (very small) collection of Groovy (v2.0+) extensions for String and GString. ","archived":false,"fork":false,"pushed_at":"2017-05-14T18:57:50.000Z","size":794,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-11T12:38:14.637Z","etag":null,"topics":["groovy","gstring","gstring-methods","maven-wrapper"],"latest_commit_sha":null,"homepage":"http://rvenutolo.github.io/groovy-string-extensions/","language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rvenutolo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-10T18:40:30.000Z","updated_at":"2016-10-30T12:56:17.000Z","dependencies_parsed_at":"2022-09-06T23:31:09.927Z","dependency_job_id":null,"html_url":"https://github.com/rvenutolo/groovy-string-extensions","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/rvenutolo/groovy-string-extensions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvenutolo%2Fgroovy-string-extensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvenutolo%2Fgroovy-string-extensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvenutolo%2Fgroovy-string-extensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvenutolo%2Fgroovy-string-extensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rvenutolo","download_url":"https://codeload.github.com/rvenutolo/groovy-string-extensions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvenutolo%2Fgroovy-string-extensions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269593471,"owners_count":24443735,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-09T02:00:10.424Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["groovy","gstring","gstring-methods","maven-wrapper"],"created_at":"2024-11-15T20:12:56.537Z","updated_at":"2025-08-09T15:11:15.511Z","avatar_url":"https://github.com/rvenutolo.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"# groovy-string-extensions\n\u003c!-- START_REMOVE_FOR_SITE --\u003e\n[![Build Status](https://travis-ci.org/rvenutolo/groovy-string-extensions.svg?branch=master)](https://travis-ci.org/rvenutolo/groovy-string-extensions)\n[![Coverage Status](https://codecov.io/gh/rvenutolo/groovy-string-extensions/branch/master/graph/badge.svg)](https://codecov.io/gh/rvenutolo/groovy-string-extensions)\n[![Quality Gate](https://sonarqube.com/api/badges/gate?key=org.venutolo:groovy-string-extensions)](https://sonarqube.com/dashboard/index/org.venutolo:groovy-string-extensions)\n[![Dependency Status](https://www.versioneye.com/user/projects/57c3491212b52600166f89ad/badge.svg)](https://www.versioneye.com/user/projects/57c3491212b52600166f89ad)\n[![Dependency Status](https://dependencyci.com/github/rvenutolo/groovy-string-extensions/badge)](https://dependencyci.com/github/rvenutolo/groovy-string-extensions)\n[![Dependencies](https://app.updateimpact.com/badge/766637912447127552/org.venutolo%3Agroovy-string-extensions%3A0.1.0.svg?config=compile)](https://app.updateimpact.com/latest/766637912447127552/org.venutolo%3Agroovy-string-extensions%3A0.1.0)\n                            \n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.venutolo/groovy-string-extensions/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.venutolo/groovy-string-extensions)\n[![GitHub release](https://img.shields.io/github/release/rvenutolo/groovy-string-extensions.svg)](https://github.com/rvenutolo/groovy-string-extensions/releases)\n[![Maven Site](https://img.shields.io/badge/Maven%20Site-0.1.0-brightgreen.svg)](https://rvenutolo.github.io/groovy-string-extensions/0.1.0/)\n[![Groovydoc](https://img.shields.io/badge/Groovydoc-0.1.0-blue.svg)](https://rvenutolo.github.io/groovy-string-extensions/0.1.0/apidocs/)\n\n[![License](https://img.shields.io/hexpm/l/plug.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Sputnik](https://sputnik.ci/conf/badge)](https://sputnik.ci/app#/builds/rvenutolo/groovy-string-extensions)\n\u003c!-- END_REMOVE_FOR_SITE --\u003e\nA (very small) collection of Groovy (v2.0+) extensions for String and GString.\n\n---\n\n#### Maven:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.venutolo\u003c/groupId\u003e\n    \u003cartifactId\u003egroovy-string-extensions\u003c/artifactId\u003e\n    \u003cversion\u003e0.1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n#### Gradle:\n\n```groovy\ncompile 'org.venutolo:groovy-string-extensions:0.1.0'\n```\n\n---\n\n## Extensions Methods\n\n__Note:__ The GString methods do not modify the GString instance, and instead return a separate GString instance. The GString methods also do not modify the embedded values.\n\n### `.joinLines()`\n\n```groovy\nstatic String joinLines(String self)\nstatic GString joinLines(GString self)\n```\n\nProvides a method to trim leading and trailing whitespace and join multiple with a single space.\n\n#### Example:\n\n```groovy\nString s = '''\n    This is a multi-line String\n    that I want to join into one\n    single line.\n'''\n\nassert s.joinLines() == 'This is a multi-line String that I want to join into one single line.'\n```\n\n### `.trimAndCollapseWhitespace()`\n\n```groovy\nstatic String trimAndCollapseWhitespace(String self)\nstatic String trimAndCollapseWhitespace(GString self)\n```\n\nProvides a method to trim leading and trailing whitespace and collapse multiple whitespace characters to one single space.\n\n#### Example:\n\n```groovy\nGString query = \"\"\"\n    SELECT *\n    FROM   cities\n    WHERE  country = ${country}\n    AND    region  = ${region}\n\"\"\"\n\nassert query.trimAndCollapseWhitespace() == \"SELECT * FROM cities WHERE country = ${country} AND region = ${region}\"\n```\n\n\u003c!-- START_REMOVE_FOR_SITE --\u003e\n---\n \n### Make Release\n\n```bash\n./mvnw -B release:clean release:prepare release:perform\n```\n\n### Update Maven Wrapper\n\nUse Maven Wrapper plugin\n```bash\nmvn -N io.takari:maven:wrapper -Dmaven=3.5.0\n```\n\nDownload latest scripts\n```bash\nwget https://raw.githubusercontent.com/takari/maven-wrapper/master/mvnw\nwget https://raw.githubusercontent.com/takari/maven-wrapper/master/mvnw.cmd\n```\n\u003c!-- END_REMOVE_FOR_SITE --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvenutolo%2Fgroovy-string-extensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frvenutolo%2Fgroovy-string-extensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvenutolo%2Fgroovy-string-extensions/lists"}