Skip to content

Commit

Permalink
Release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
inxilpro committed Apr 17, 2024
1 parent 23bc208 commit 780cfa4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@ format. This project adheres to [Semantic Versioning](https://semver.org/spec/v2

## [0.0.1] - 2024-04-17

## [0.0.1]
### Added

- Added support for `length` (number of chars) and `width` (multibyte width of chars)
- Added support for `prepend` and `append`
- Added support for `startsWith` and `endsWith`
- Added support for `padLeft`, `padRight`, and `padBoth`
- Added support for `wordwrap`
- Added support for `explode`
- Added support for `is` (for comparing two ansi strings)

# Keep a Changelog Syntax

Expand Down
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,29 @@
</a>
</div>

# AnsiPants 👖💫
# ANSI Pants 👖💫

## Installation

```shell
composer require glhd/ansipants
```

## Usage

You can instantiate a new ANSI string using the `ansi()` helper, with `new AnsiString()`,
or with `AnsiString::make()`. All string manipulation functions can be chained, just like
the Laravel `Stringable` class. Where appropriate, you can pass an additional `ignore_style: true`
argument into a function to make that function ignore the ANSI styles that are applied
(like color or font style).

An example:

```php
ansi("\e[1mHello💥 \e[3mwo\e[0mrld")
->append(" 🥸🥸🥸")
->padLeft(100)
->wordWrap();
->wordwrap();
```

## Resources
Expand Down

0 comments on commit 780cfa4

Please sign in to comment.