Skip to content

Comments

Add Blink() extension method for StringBuilder#3

Draft
codegen-sh[bot] wants to merge 1 commit intomasterfrom
codegen-bot/add-blink-extension-method-1748865466
Draft

Add Blink() extension method for StringBuilder#3
codegen-sh[bot] wants to merge 1 commit intomasterfrom
codegen-bot/add-blink-extension-method-1748865466

Conversation

@codegen-sh
Copy link

@codegen-sh codegen-sh bot commented Jun 2, 2025

This PR adds a new Blink() extension method to the AnsiExtensions class that applies the ANSI BLINK attribute to StringBuilder instances.

Changes Made

  • Added Blink() extension method in src/Ansi/AnsiExtensions.cs

    • Uses the existing Mode.Blink enum value (ANSI code 5)
    • Follows the same pattern as other formatting methods
    • Simple one-liner: b.SetMode( Mode.Blink )
  • Updated console test in src/Ansi.ConsoleTest/Program.cs

    • Added demonstration of the new Blink() method
    • Shows " BLINK!" text with blinking effect

Usage

var sb = new StringBuilder()
    .Append("Normal text ")
    .Blink()
    .Append("This text will blink!")
    .SetMode(Mode.Reset);

The method integrates seamlessly with the existing fluent API and follows all established patterns in the codebase.


💻 View my workAbout Codegen

- Added Blink() extension method to AnsiExtensions class
- Uses existing Mode.Blink enum value (ANSI code 5)
- Updated console test to demonstrate blinking text
- Follows existing code patterns and conventions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants