diff --git a/src/gleam_community/ansi.gleam b/src/gleam_community/ansi.gleam
index 0e2ddfe..3dc7305 100644
--- a/src/gleam_community/ansi.gleam
+++ b/src/gleam_community/ansi.gleam
@@ -52,6 +52,8 @@
//// - [`bg_hex`](#bg_hex)
//// - [`bg_colour`](#bg_colour)
//// - [`bg_color`](#bg_color)
+//// - **Utilities**
+//// - [`strip`](#strip)
////
//// ---
////
@@ -96,6 +98,7 @@
import gleam/int
import gleam/list
import gleam/string
+import gleam/regex
import gleam_community/colour.{type Colour} as gc_colour
// CONSTS ---------------------------------------------------------------------
@@ -2318,6 +2321,44 @@ pub fn bg_colour(text: String, colour: Colour) -> String {
bg_hex(text, hex_colour)
}
+/// Strips the ansi control characters from the text.
+///
+/// Example:
+///
+/// ```gleam
+/// import gleam_community/ansi
+///
+/// fn example() {
+/// let bold_lucy = ansi.bold("lucy")
+/// // => "\x1B[1mlucy\x1B[22m"
+/// ansi.strip(bold_lucy)
+/// // => "lucy"
+/// }
+/// ```
+///
+/// In this example, the text "lucy" is boldened by `ansi.bold` and then converted back to the original
+/// string with `ansi.strip`.
+///