{"id":19053769,"url":"https://github.com/siddhi-io/siddhi-execution-string","last_synced_at":"2025-04-15T06:53:39.623Z","repository":{"id":43712822,"uuid":"74117128","full_name":"siddhi-io/siddhi-execution-string","owner":"siddhi-io","description":"Extension that provides basic string handling capabilities","archived":false,"fork":false,"pushed_at":"2022-12-02T12:34:23.000Z","size":2409,"stargazers_count":4,"open_issues_count":3,"forks_count":37,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-04-15T06:53:33.188Z","etag":null,"topics":["execution","expression-evaluator","extension","siddhi","string","utility"],"latest_commit_sha":null,"homepage":"https://wso2-extensions.github.io/siddhi-execution-string/","language":"Java","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/siddhi-io.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-11-18T09:52:03.000Z","updated_at":"2022-02-22T08:15:14.000Z","dependencies_parsed_at":"2023-01-22T19:01:19.996Z","dependency_job_id":null,"html_url":"https://github.com/siddhi-io/siddhi-execution-string","commit_stats":null,"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siddhi-io%2Fsiddhi-execution-string","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siddhi-io%2Fsiddhi-execution-string/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siddhi-io%2Fsiddhi-execution-string/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siddhi-io%2Fsiddhi-execution-string/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siddhi-io","download_url":"https://codeload.github.com/siddhi-io/siddhi-execution-string/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249023711,"owners_count":21199958,"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","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":["execution","expression-evaluator","extension","siddhi","string","utility"],"created_at":"2024-11-08T23:34:09.383Z","updated_at":"2025-04-15T06:53:39.602Z","avatar_url":"https://github.com/siddhi-io.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Siddhi Execution String\n======================================\n\n  [![Jenkins Build Status](https://wso2.org/jenkins/job/siddhi/job/siddhi-execution-string/badge/icon)](https://wso2.org/jenkins/job/siddhi/job/siddhi-execution-string/)\n  [![GitHub Release](https://img.shields.io/github/release/siddhi-io/siddhi-execution-string.svg)](https://github.com/siddhi-io/siddhi-execution-string/releases)\n  [![GitHub Release Date](https://img.shields.io/github/release-date/siddhi-io/siddhi-execution-string.svg)](https://github.com/siddhi-io/siddhi-execution-string/releases)\n  [![GitHub Open Issues](https://img.shields.io/github/issues-raw/siddhi-io/siddhi-execution-string.svg)](https://github.com/siddhi-io/siddhi-execution-string/issues)\n  [![GitHub Last Commit](https://img.shields.io/github/last-commit/siddhi-io/siddhi-execution-string.svg)](https://github.com/siddhi-io/siddhi-execution-string/commits/master)\n  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nThe **siddhi-execution-string extension** is a \u003ca target=\"_blank\" href=\"https://siddhi.io/\"\u003eSiddhi\u003c/a\u003e extension that provides basic string handling capabilities such as concat, length, replace all, etc.\n\nFor information on \u003ca target=\"_blank\" href=\"https://siddhi.io/\"\u003eSiddhi\u003c/a\u003e and it's features refer \u003ca target=\"_blank\" href=\"https://siddhi.io/redirect/docs.html\"\u003eSiddhi Documentation\u003c/a\u003e. \n\n## Download\n\n* Versions 5.x and above with group id `io.siddhi.extension.*` from \u003ca target=\"_blank\" href=\"https://mvnrepository.com/artifact/io.siddhi.extension.execution.string/siddhi-execution-string/\"\u003ehere\u003c/a\u003e.\n* Versions 4.x and lower with group id `org.wso2.extension.siddhi.*` from \u003ca target=\"_blank\" href=\"https://mvnrepository.com/artifact/org.wso2.extension.siddhi.execution.string/siddhi-execution-string\"\u003ehere\u003c/a\u003e.\n\n## Latest API Docs \n\nLatest API Docs is \u003ca target=\"_blank\" href=\"https://siddhi-io.github.io/siddhi-execution-string/api/5.0.13\"\u003e5.0.13\u003c/a\u003e.\n\n## Features\n\n* \u003ca target=\"_blank\" href=\"https://siddhi-io.github.io/siddhi-execution-string/api/5.0.13/#groupconcat-aggregate-function\"\u003egroupConcat\u003c/a\u003e *(\u003ca target=\"_blank\" href=\"http://siddhi.io/en/v5.1/docs/query-guide/#aggregate-function\"\u003eAggregate Function\u003c/a\u003e)*\u003cbr\u003e \u003cdiv style=\"padding-left: 1em;\"\u003e\u003cp\u003e\u003cp style=\"word-wrap: break-word;margin: 0;\"\u003eThis function aggregates the received events by concatenating the keys in those events using a separator, e.g.,a comma (,) or a hyphen (-), and returns the concatenated key string.\u003c/p\u003e\u003c/p\u003e\u003c/div\u003e\n* \u003ca target=\"_blank\" href=\"https://siddhi-io.github.io/siddhi-execution-string/api/5.0.13/#charat-function\"\u003echarAt\u003c/a\u003e *(\u003ca target=\"_blank\" href=\"http://siddhi.io/en/v5.1/docs/query-guide/#function\"\u003eFunction\u003c/a\u003e)*\u003cbr\u003e \u003cdiv style=\"padding-left: 1em;\"\u003e\u003cp\u003e\u003cp style=\"word-wrap: break-word;margin: 0;\"\u003eThis function returns the 'char' value that is present at the given index position. of the input string.\u003c/p\u003e\u003c/p\u003e\u003c/div\u003e\n* \u003ca target=\"_blank\" href=\"https://siddhi-io.github.io/siddhi-execution-string/api/5.0.13/#charfrequency-function\"\u003echarFrequency\u003c/a\u003e *(\u003ca target=\"_blank\" href=\"http://siddhi.io/en/v5.1/docs/query-guide/#function\"\u003eFunction\u003c/a\u003e)*\u003cbr\u003e \u003cdiv style=\"padding-left: 1em;\"\u003e\u003cp\u003e\u003cp style=\"word-wrap: break-word;margin: 0;\"\u003eGives the frequency of a char in \u003ccode\u003einput string\u003c/code\u003e.\u003c/p\u003e\u003c/p\u003e\u003c/div\u003e\n* \u003ca target=\"_blank\" href=\"https://siddhi-io.github.io/siddhi-execution-string/api/5.0.13/#coalesce-function\"\u003ecoalesce\u003c/a\u003e *(\u003ca target=\"_blank\" href=\"http://siddhi.io/en/v5.1/docs/query-guide/#function\"\u003eFunction\u003c/a\u003e)*\u003cbr\u003e \u003cdiv style=\"padding-left: 1em;\"\u003e\u003cp\u003e\u003cp style=\"word-wrap: break-word;margin: 0;\"\u003e This returns the first input parameter value of the given argument, that is not null.\u003c/p\u003e\u003c/p\u003e\u003c/div\u003e\n* \u003ca target=\"_blank\" href=\"https://siddhi-io.github.io/siddhi-execution-string/api/5.0.13/#concat-function\"\u003econcat\u003c/a\u003e *(\u003ca target=\"_blank\" href=\"http://siddhi.io/en/v5.1/docs/query-guide/#function\"\u003eFunction\u003c/a\u003e)*\u003cbr\u003e \u003cdiv style=\"padding-left: 1em;\"\u003e\u003cp\u003e\u003cp style=\"word-wrap: break-word;margin: 0;\"\u003eThis function returns a string value that is obtained as a result of concatenating two or more input string values.\u003c/p\u003e\u003c/p\u003e\u003c/div\u003e\n* \u003ca target=\"_blank\" href=\"https://siddhi-io.github.io/siddhi-execution-string/api/5.0.13/#contains-function\"\u003econtains\u003c/a\u003e *(\u003ca target=\"_blank\" href=\"http://siddhi.io/en/v5.1/docs/query-guide/#function\"\u003eFunction\u003c/a\u003e)*\u003cbr\u003e \u003cdiv style=\"padding-left: 1em;\"\u003e\u003cp\u003e\u003cp style=\"word-wrap: break-word;margin: 0;\"\u003eThis function returns \u003ccode\u003etrue\u003c/code\u003e if the\u003ccode\u003einput.string\u003c/code\u003e contains the specified sequence of char values in the \u003ccode\u003esearch.string\u003c/code\u003e. \u003c/p\u003e\u003c/p\u003e\u003c/div\u003e\n* \u003ca target=\"_blank\" href=\"https://siddhi-io.github.io/siddhi-execution-string/api/5.0.13/#equalsignorecase-function\"\u003eequalsIgnoreCase\u003c/a\u003e *(\u003ca target=\"_blank\" href=\"http://siddhi.io/en/v5.1/docs/query-guide/#function\"\u003eFunction\u003c/a\u003e)*\u003cbr\u003e \u003cdiv style=\"padding-left: 1em;\"\u003e\u003cp\u003e\u003cp style=\"word-wrap: break-word;margin: 0;\"\u003eThis returns a boolean value by comparing two strings lexicographically without considering the letter case.\u003c/p\u003e\u003c/p\u003e\u003c/div\u003e\n* \u003ca target=\"_blank\" href=\"https://siddhi-io.github.io/siddhi-execution-string/api/5.0.13/#filltemplate-function\"\u003efillTemplate\u003c/a\u003e *(\u003ca target=\"_blank\" href=\"http://siddhi.io/en/v5.1/docs/query-guide/#function\"\u003eFunction\u003c/a\u003e)*\u003cbr\u003e \u003cdiv style=\"padding-left: 1em;\"\u003e\u003cp\u003e\u003cp style=\"word-wrap: break-word;margin: 0;\"\u003efillTemplate(string, map) will replace all the keys in the string using values in the map. fillTemplate(string, r1, r2 ..) replace all the entries {{1}}, {{2}}, {{3}} with r1 , r2, r3.\u003c/p\u003e\u003c/p\u003e\u003c/div\u003e\n* \u003ca target=\"_blank\" href=\"https://siddhi-io.github.io/siddhi-execution-string/api/5.0.13/#hex-function\"\u003ehex\u003c/a\u003e *(\u003ca target=\"_blank\" href=\"http://siddhi.io/en/v5.1/docs/query-guide/#function\"\u003eFunction\u003c/a\u003e)*\u003cbr\u003e \u003cdiv style=\"padding-left: 1em;\"\u003e\u003cp\u003e\u003cp style=\"word-wrap: break-word;margin: 0;\"\u003eThis function returns a hexadecimal string by converting each byte of each character in the input string to two hexadecimal digits.\u003c/p\u003e\u003c/p\u003e\u003c/div\u003e\n* \u003ca target=\"_blank\" href=\"https://siddhi-io.github.io/siddhi-execution-string/api/5.0.13/#length-function\"\u003elength\u003c/a\u003e *(\u003ca target=\"_blank\" href=\"http://siddhi.io/en/v5.1/docs/query-guide/#function\"\u003eFunction\u003c/a\u003e)*\u003cbr\u003e \u003cdiv style=\"padding-left: 1em;\"\u003e\u003cp\u003e\u003cp style=\"word-wrap: break-word;margin: 0;\"\u003eReturns the length of the input string.\u003c/p\u003e\u003c/p\u003e\u003c/div\u003e\n* \u003ca target=\"_blank\" href=\"https://siddhi-io.github.io/siddhi-execution-string/api/5.0.13/#locate-function\"\u003elocate\u003c/a\u003e *(\u003ca target=\"_blank\" href=\"http://siddhi.io/en/v5.1/docs/query-guide/#function\"\u003eFunction\u003c/a\u003e)*\u003cbr\u003e \u003cdiv style=\"padding-left: 1em;\"\u003e\u003cp\u003e\u003cp style=\"word-wrap: break-word;margin: 0;\"\u003eThis function returns the position of one string within another. Optionally, the user can give the starting index to be search from.\u003c/p\u003e\u003c/p\u003e\u003c/div\u003e\n* \u003ca target=\"_blank\" href=\"https://siddhi-io.github.io/siddhi-execution-string/api/5.0.13/#lower-function\"\u003elower\u003c/a\u003e *(\u003ca target=\"_blank\" href=\"http://siddhi.io/en/v5.1/docs/query-guide/#function\"\u003eFunction\u003c/a\u003e)*\u003cbr\u003e \u003cdiv style=\"padding-left: 1em;\"\u003e\u003cp\u003e\u003cp style=\"word-wrap: break-word;margin: 0;\"\u003eConverts the capital letters in the input string to the equivalent simple letters.\u003c/p\u003e\u003c/p\u003e\u003c/div\u003e\n* \u003ca target=\"_blank\" href=\"https://siddhi-io.github.io/siddhi-execution-string/api/5.0.13/#regexp-function\"\u003eregexp\u003c/a\u003e *(\u003ca target=\"_blank\" href=\"http://siddhi.io/en/v5.1/docs/query-guide/#function\"\u003eFunction\u003c/a\u003e)*\u003cbr\u003e \u003cdiv style=\"padding-left: 1em;\"\u003e\u003cp\u003e\u003cp style=\"word-wrap: break-word;margin: 0;\"\u003eReturns a boolean value based on the matchability of the input string and the given regular expression.\u003c/p\u003e\u003c/p\u003e\u003c/div\u003e\n* \u003ca target=\"_blank\" href=\"https://siddhi-io.github.io/siddhi-execution-string/api/5.0.13/#repeat-function\"\u003erepeat\u003c/a\u003e *(\u003ca target=\"_blank\" href=\"http://siddhi.io/en/v5.1/docs/query-guide/#function\"\u003eFunction\u003c/a\u003e)*\u003cbr\u003e \u003cdiv style=\"padding-left: 1em;\"\u003e\u003cp\u003e\u003cp style=\"word-wrap: break-word;margin: 0;\"\u003eRepeats the input string for a specified number of times.\u003c/p\u003e\u003c/p\u003e\u003c/div\u003e\n* \u003ca target=\"_blank\" href=\"https://siddhi-io.github.io/siddhi-execution-string/api/5.0.13/#replaceall-function\"\u003ereplaceAll\u003c/a\u003e *(\u003ca target=\"_blank\" href=\"http://siddhi.io/en/v5.1/docs/query-guide/#function\"\u003eFunction\u003c/a\u003e)*\u003cbr\u003e \u003cdiv style=\"padding-left: 1em;\"\u003e\u003cp\u003e\u003cp style=\"word-wrap: break-word;margin: 0;\"\u003eFinds all the substrings of the input string that matches with the given expression, and replaces them with the given replacement string.\u003c/p\u003e\u003c/p\u003e\u003c/div\u003e\n* \u003ca target=\"_blank\" href=\"https://siddhi-io.github.io/siddhi-execution-string/api/5.0.13/#replacefirst-function\"\u003ereplaceFirst\u003c/a\u003e *(\u003ca target=\"_blank\" href=\"http://siddhi.io/en/v5.1/docs/query-guide/#function\"\u003eFunction\u003c/a\u003e)*\u003cbr\u003e \u003cdiv style=\"padding-left: 1em;\"\u003e\u003cp\u003e\u003cp style=\"word-wrap: break-word;margin: 0;\"\u003eFinds the first substring of the input string that matches with the given regular expression, and replaces itwith the given replacement string.\u003c/p\u003e\u003c/p\u003e\u003c/div\u003e\n* \u003ca target=\"_blank\" href=\"https://siddhi-io.github.io/siddhi-execution-string/api/5.0.13/#reverse-function\"\u003ereverse\u003c/a\u003e *(\u003ca target=\"_blank\" href=\"http://siddhi.io/en/v5.1/docs/query-guide/#function\"\u003eFunction\u003c/a\u003e)*\u003cbr\u003e \u003cdiv style=\"padding-left: 1em;\"\u003e\u003cp\u003e\u003cp style=\"word-wrap: break-word;margin: 0;\"\u003eReturns the input string in the reverse order character-wise and string-wise.\u003c/p\u003e\u003c/p\u003e\u003c/div\u003e\n* \u003ca target=\"_blank\" href=\"https://siddhi-io.github.io/siddhi-execution-string/api/5.0.13/#split-function\"\u003esplit\u003c/a\u003e *(\u003ca target=\"_blank\" href=\"http://siddhi.io/en/v5.1/docs/query-guide/#function\"\u003eFunction\u003c/a\u003e)*\u003cbr\u003e \u003cdiv style=\"padding-left: 1em;\"\u003e\u003cp\u003e\u003cp style=\"word-wrap: break-word;margin: 0;\"\u003eSplits the  \u003ccode\u003einput.string\u003c/code\u003e into substrings using the value parsed in the \u003ccode\u003esplit.string\u003c/code\u003e and returns the substring at the position specified in the \u003ccode\u003egroup.number\u003c/code\u003e.\u003c/p\u003e\u003c/p\u003e\u003c/div\u003e\n* \u003ca target=\"_blank\" href=\"https://siddhi-io.github.io/siddhi-execution-string/api/5.0.13/#strcmp-function\"\u003estrcmp\u003c/a\u003e *(\u003ca target=\"_blank\" href=\"http://siddhi.io/en/v5.1/docs/query-guide/#function\"\u003eFunction\u003c/a\u003e)*\u003cbr\u003e \u003cdiv style=\"padding-left: 1em;\"\u003e\u003cp\u003e\u003cp style=\"word-wrap: break-word;margin: 0;\"\u003eCompares two strings lexicographically and returns an integer value. If both strings are equal, 0 is returned. If  the first string is lexicographically greater than the second string, a positive value is returned. If the first string is lexicographically greater than the second string, a negative value is returned.\u003c/p\u003e\u003c/p\u003e\u003c/div\u003e\n* \u003ca target=\"_blank\" href=\"https://siddhi-io.github.io/siddhi-execution-string/api/5.0.13/#substr-function\"\u003esubstr\u003c/a\u003e *(\u003ca target=\"_blank\" href=\"http://siddhi.io/en/v5.1/docs/query-guide/#function\"\u003eFunction\u003c/a\u003e)*\u003cbr\u003e \u003cdiv style=\"padding-left: 1em;\"\u003e\u003cp\u003e\u003cp style=\"word-wrap: break-word;margin: 0;\"\u003eReturns a substring of the input string by considering a subset or all of the following factors: starting index, length, regular expression, and regex group number.\u003c/p\u003e\u003c/p\u003e\u003c/div\u003e\n* \u003ca target=\"_blank\" href=\"https://siddhi-io.github.io/siddhi-execution-string/api/5.0.13/#trim-function\"\u003etrim\u003c/a\u003e *(\u003ca target=\"_blank\" href=\"http://siddhi.io/en/v5.1/docs/query-guide/#function\"\u003eFunction\u003c/a\u003e)*\u003cbr\u003e \u003cdiv style=\"padding-left: 1em;\"\u003e\u003cp\u003e\u003cp style=\"word-wrap: break-word;margin: 0;\"\u003eReturns a copy of the input string without the leading and trailing whitespace (if any).\u003c/p\u003e\u003c/p\u003e\u003c/div\u003e\n* \u003ca target=\"_blank\" href=\"https://siddhi-io.github.io/siddhi-execution-string/api/5.0.13/#unhex-function\"\u003eunhex\u003c/a\u003e *(\u003ca target=\"_blank\" href=\"http://siddhi.io/en/v5.1/docs/query-guide/#function\"\u003eFunction\u003c/a\u003e)*\u003cbr\u003e \u003cdiv style=\"padding-left: 1em;\"\u003e\u003cp\u003e\u003cp style=\"word-wrap: break-word;margin: 0;\"\u003eReturns a string by converting the hexadecimal characters in the input string.\u003c/p\u003e\u003c/p\u003e\u003c/div\u003e\n* \u003ca target=\"_blank\" href=\"https://siddhi-io.github.io/siddhi-execution-string/api/5.0.13/#upper-function\"\u003eupper\u003c/a\u003e *(\u003ca target=\"_blank\" href=\"http://siddhi.io/en/v5.1/docs/query-guide/#function\"\u003eFunction\u003c/a\u003e)*\u003cbr\u003e \u003cdiv style=\"padding-left: 1em;\"\u003e\u003cp\u003e\u003cp style=\"word-wrap: break-word;margin: 0;\"\u003eConverts the simple letters in the input string to the equivalent capital/block letters.\u003c/p\u003e\u003c/p\u003e\u003c/div\u003e\n* \u003ca target=\"_blank\" href=\"https://siddhi-io.github.io/siddhi-execution-string/api/5.0.13/#tokenize-stream-processor\"\u003etokenize\u003c/a\u003e *(\u003ca target=\"_blank\" href=\"http://siddhi.io/en/v5.1/docs/query-guide/#stream-processor\"\u003eStream Processor\u003c/a\u003e)*\u003cbr\u003e \u003cdiv style=\"padding-left: 1em;\"\u003e\u003cp\u003e\u003cp style=\"word-wrap: break-word;margin: 0;\"\u003eThis function splits the input string into tokens using a given regular expression and returns the split tokens.\u003c/p\u003e\u003c/p\u003e\u003c/div\u003e\n\n## Dependencies \n\nThere are no other dependencies needed for this extension. \n\n## Installation\n\nFor installing this extension on various siddhi execution environments refer Siddhi documentation section on \u003ca target=\"_blank\" href=\"https://siddhi.io/redirect/add-extensions.html\"\u003eadding extensions\u003c/a\u003e.\n\n## Support and Contribution\n\n* We encourage users to ask questions and get support via \u003ca target=\"_blank\" href=\"https://stackoverflow.com/questions/tagged/siddhi\"\u003eStackOverflow\u003c/a\u003e, make sure to add the `siddhi` tag to the issue for better response.\n\n* If you find any issues related to the extension please report them on \u003ca target=\"_blank\" href=\"https://github.com/siddhi-io/siddhi-execution-string/issues\"\u003ethe issue tracker\u003c/a\u003e.\n\n* For production support and other contribution related information refer \u003ca target=\"_blank\" href=\"https://siddhi.io/community/\"\u003eSiddhi Community\u003c/a\u003e documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiddhi-io%2Fsiddhi-execution-string","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiddhi-io%2Fsiddhi-execution-string","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiddhi-io%2Fsiddhi-execution-string/lists"}