# symfony/string

Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way

Repository: https://github.com/symfony/string
Canonical: https://ross.abutalabs.com/products/string
Homepage: https://symfony.com/string
Language: PHP
License: MIT
License Family: permissive
Topics: php, symfony, component, symfony-component, string, utf8, unicode, grapheme, i18n, utf-8
Last push: 2026-07-29T11:57:47+00:00

## Health v2 (maintenance only)
Score: 96/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 95, release rhythm 95, longevity 100
- inputs: {"age_days": 2524, "days_push": 35, "days_rel": 35, "gap_med": 0, "n_releases_24m": 44}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1781, forks 19 (observed 2026-08-28T04:05:35.544058+00:00)

## What it is
A PHP library from the Symfony ecosystem providing an object-oriented API for string manipulation that uniformly handles bytes, UTF-8 code points, and grapheme clusters. It also includes utilities like a slugger and an English inflector for pluralization and singularization.

## Use cases
- manipulate unicode strings safely in php
- handle emoji and grapheme clusters in text processing
- generate url slugs from arbitrary text
- pluralize and singularize english words
- work with utf-8 code points instead of bytes
- truncate and pad multibyte strings correctly
- normalize string case for internationalized content

## When to choose
- your php project needs correct unicode-aware string operations
- you need slug generation or word inflection out of the box
- you want a consistent string API regardless of mbstring availability
- you are already using Symfony components

## When to avoid
- you only need simple ASCII string handling covered by native PHP functions
- you work outside the PHP ecosystem
- you need heavyweight text processing like full NLP or regex-heavy parsing

## Facets
- artifact type: library
- maturity: stable
- function: nlp, internationalization, developer-tools
- domain: programming-languages, developer-tools, text-editors
- platform: php, cross-platform
- tags: strings, unicode, utf-8, grapheme-clusters, slugger, inflector, symfony-component, object-oriented-api, localization

## Member repositories
- symfony/string (main) score 96

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:35.544058+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:24:25.812033+00:00, confidence not recorded.
  - readme: https://github.com/symfony/string (fetched 2026-08-28T04:05:35.544058+00:00, sha 0422b6286ca1)
  - homepage: https://symfony.com/string (fetched 2026-08-29T11:03:08.124638+00:00, sha b4b9f2ccecb3)
  - site_page: https://symfony.com/doc (fetched 2026-08-29T11:03:08.127047+00:00, sha 44889134f4fb)
  - site_page: https://symfony.com/doc/current/components/string.html (fetched 2026-08-29T11:03:08.129064+00:00, sha 72f4650b4c92)
  - site_page: https://symfony.com/releases (fetched 2026-08-29T11:03:08.131621+00:00, sha 5bd749e2b676)
  - site_page: https://symfony.com/blog/category/releases (fetched 2026-08-29T11:03:08.133475+00:00, sha cb9687c6ccb6)
- Data as of 2026-08-30T08:39:29.467469+00:00.
