{"id":18655039,"url":"https://github.com/hmlendea/nuciextensions","last_synced_at":"2025-06-11T17:05:51.792Z","repository":{"id":42067311,"uuid":"175015077","full_name":"hmlendea/nuciextensions","owner":"hmlendea","description":".NET NuGet package with useful extension methods.","archived":false,"fork":false,"pushed_at":"2025-06-04T18:21:57.000Z","size":116,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-04T22:34:10.385Z","etag":null,"topics":["dotnet","nuget"],"latest_commit_sha":null,"homepage":"https://nuget.org/packages/NuciExtensions","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hmlendea.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":"hmlendea","open_collective":null,"ko_fi":"hmlendea","tidelift":null,"community_bridge":null,"liberapay":"HMlendea","issuehunt":null,"otechie":null,"custom":"https://hmlendea.go.ro/fund.html"}},"created_at":"2019-03-11T14:15:34.000Z","updated_at":"2025-06-04T18:21:57.000Z","dependencies_parsed_at":"2024-03-22T16:42:32.752Z","dependency_job_id":"39367d07-6a06-40e0-a2b4-85fa7ca1968c","html_url":"https://github.com/hmlendea/nuciextensions","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/hmlendea/nuciextensions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmlendea%2Fnuciextensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmlendea%2Fnuciextensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmlendea%2Fnuciextensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmlendea%2Fnuciextensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hmlendea","download_url":"https://codeload.github.com/hmlendea/nuciextensions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmlendea%2Fnuciextensions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259302398,"owners_count":22837129,"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":["dotnet","nuget"],"created_at":"2024-11-07T07:17:32.174Z","updated_at":"2025-06-11T17:05:51.785Z","avatar_url":"https://github.com/hmlendea.png","language":"C#","funding_links":["https://patreon.com/hmlendea","https://ko-fi.com/hmlendea","https://liberapay.com/HMlendea","https://hmlendea.go.ro/fund.html"],"categories":[],"sub_categories":[],"readme":"[![Donate](https://img.shields.io/badge/-%E2%99%A5%20Donate-%23ff69b4)](https://hmlendea.go.ro/fund.html) [![Build Status](https://github.com/hmlendea/nuciextensions/actions/workflows/dotnet.yml/badge.svg)](https://github.com/hmlendea/nuciextensions/actions/workflows/dotnet.yml) [![Latest GitHub release](https://img.shields.io/github/v/release/hmlendea/nuciextensions)](https://github.com/hmlendea/nuciextensions/releases/latest)\n\n# NuciExtensions\n\n.NET NuGet package with useful extension methods.\n\n# Installation\n\n[![Get it from NuGet](https://raw.githubusercontent.com/hmlendea/readme-assets/master/badges/stores/nuget.png)](https://nuget.org/packages/NuciExtensions)\n\n**.NET CLI**:\n```bash\ndotnet add package NuciExtensions\n```\n\n**Package Manager**:\n```powershell\nInstall-Package NuciExtensions\n```\n\n# Features\n\n## DateTime\n\n  - GetElapsedUnixTime()\n    - Gets the elapsed UTC time since January 1 1970\n  - FromUnixTime()\n    - Gets a DateTime object from a UNIX timestamp\n\n## IDictionary\n\n  - AddOrUpdate(TKey, TValue)\n    - Adds the specified pair to the dictionary, or updates the value if it already exists\n  - TryGetValue(TKey)\n    - Gets the value of the specified key if it exists, or the default value of TValue if it doesn't\n\n## IEnumerable\n\n  - GetRandomElement()\n    - Gets a random element from the collection\n  - GetDuplicates()\n    - Returns a new collection containing the values of the original one that appear more than once\n\n## Enum\n\n  - GetDisplayName()\n    - Gets the value of the DisplayAttribute if it is defined, or the name of the enumeration item if it doesn't\n\n## File\n\n  - ExistsInPathVariable(string)\n    - Checks whether a file exists in any of the PATH environment variable's directories\n\n## List\n\n  - Shuffle()\n    - Sorts the elements of the list randomly\n  - Pop()\n    - Removes the last element from the list\n\n## string\n\n  - Reverse()\n    - Returns a new string that is the reversed version of the original one\n  - Repeat(int)\n    - Returns a new string that is the original one concatenated with itself for a specified number of times\n  - ReplaceFirst(string, string)\n    - Returns a new string that is the original one with the first occurance of a substring replaced by another\n  - RemoveDiacritics()\n    - Returns a new string that is the original one with its diacritic characters replaced with basic latin characters\n  - RemovePunctuation()\n    - Returns a new string that is the original one with its punctuation characters removed\n  - Reverse()\n    - Returns a new string that is the original one with all of its characters reversed\n  - ToTitleCase()\n    - Returns a new string that is the original one with the first letter of each word in upper case, and the rest in lower case\n  - ToSentenceCase()\n    - Returns a new string that is the original one with the first letter of each sentence in upper case, and the rest in lower case\n  - ToSentence()\n    - Returns a new string that is the original one split into words and trimmed\n    - The delimitation is done by looking for upper case characters and underscores\n  - ToSnakeCase()\n    - Returns a new string that is the original one with no punctuation, and the whitespaces trimmed and replaced with underscores\n  - ToUpperSnakeCase()\n    - Returns a snake case version of the original string, with all letters in upper case\n  - ToLowerSnakeCase()\n    - Returns a snake case verison of the original string, with all letters in lower case\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmlendea%2Fnuciextensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhmlendea%2Fnuciextensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmlendea%2Fnuciextensions/lists"}