PHPackages                             tf/string - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. tf/string

ActiveLibrary

tf/string
=========

TfTruncate lets you truncate HTML content but keep some HTML tags in the result

1.4.0(11y ago)01821GPL-2.0+PHPPHP &gt;=5.2.6

Since Jun 20Pushed 11y ago1 watchersCompare

[ Source](https://github.com/tophfr/tf-string)[ Packagist](https://packagist.org/packages/tf/string)[ Docs](http://lib.tf)[ RSS](/packages/tf-string/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (2)Used By (1)

TfString
========

[](#tfstring)

One class only in this library : TfTruncate which let you truncate HTML content but keep some HTML tags in the result.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4350d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ddb5cb34e94eb5531b4b89d861a946ffcf83749e313633693424f9fb135b325d?d=identicon)[toph](/maintainers/toph)

---

Top Contributors

[![tophfr](https://avatars.githubusercontent.com/u/866760?v=4)](https://github.com/tophfr "tophfr (1 commits)")

---

Tags

htmlcontenttruncate

### Embed Badge

![Health badge](/badges/tf-string/health.svg)

```
[![Health](https://phpackages.com/badges/tf-string/health.svg)](https://phpackages.com/packages/tf-string)
```

###  Alternatives

[ezyang/htmlpurifier

Standards compliant HTML filter written in PHP

3.3k327.6M445](/packages/ezyang-htmlpurifier)[phpoffice/phpword

PHPWord - A pure PHP library for reading and writing word processing documents (OOXML, ODF, RTF, HTML, PDF)

7.6k34.7M186](/packages/phpoffice-phpword)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[willdurand/negotiation

Content Negotiation tools for PHP provided as a standalone library.

1.4k122.0M157](/packages/willdurand-negotiation)[league/html-to-markdown

An HTML-to-markdown conversion helper for PHP

1.9k28.6M199](/packages/league-html-to-markdown)[picqer/php-barcode-generator

An easy to use, non-bloated, barcode generator in PHP. Creates SVG, PNG, JPG and HTML images from the most used 1D barcode standards.

1.8k25.5M88](/packages/picqer-php-barcode-generator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
