Swiftpack.co -  plr-100daysOfSwift/StringExtensions as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
Project 24
.package(url: "https://github.com/plr-100daysOfSwift/StringExtensions.git", from: "challenge-3")


Hacking with Swift: 100 Days of Swift - Project 24

License: MIT


  1. Create a String extension that adds a withPrefix() method. If the string already contains the prefix it should return itself; if it doesn’t contain the prefix, it should return itself with the prefix added. For example: "pet".withPrefix("car") should return “carpet”.
  2. Create a String extension that adds an isNumeric property that returns true if the string holds any sort of number. Tip: creating a Double from a String is a failable initializer.
  3. Create a String extension that adds a lines property that returns an array of all the lines in a string. So, “this\nis\na\ntest” should return an array with four elements.


Stars: 0
Last commit: 2 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

Project 24
2 weeks ago

The three challenges for the project are complete.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API