SkillAgentSearch skills...

AttributedStringBuilder

A DSL for creating NSAttributedStrings

Install / Use

/learn @carson-katri/AttributedStringBuilder
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

AttributedStringBuilder

A DSL for creating an NSAttributedString. Original created to demonstrate function builders here.

Example:

NSAttributedString {
  "Hello "
    .foregroundColor(.blue)
  "World"
    .background(.orange)
    .underline(.red, style: .thick)
}

Installation

You can install it via the Swift Package Manager in Xcode 11.

Go to File > Swift Packages > Add Package Dependency...

In the text field paste the following: https://github.com/carson-katri/AttributedStringBuilder.

Documentation

Available modifiers:

  • foregroundColor
  • background
  • underline
  • font
  • shadow

Feel free to add any that're missing.

View on GitHub
GitHub Stars24
CategoryDevelopment
Updated1y ago
Forks3

Languages

Swift

Security Score

65/100

Audited on Nov 19, 2024

No findings