Sweet Swift

Make Swift Sweet by Gracefully Introducing Syntactic Sugar, Helper Functions and Common Utilities.

Design Principles

For Apple, Swift should be a clean and tidy language. For developers, the cleanness and tidiness could sometimes cause a lack of features which could be very painful. This package aims to solve this problem! I’m determined to help developers be happier and make swift sweeter!

However, to add new features, we should follow these guidelines. Otherwise, the language will become bulky and clumsy.

  • Modular

Organize features into sub-modules so that developers can import the library partially.

  • Grouped into Different Flavors

Everyone has his preference for flavors. When imported, developers can choose according to their style.

  • Correctness

Setup complete test suites for every feature.

  • Efficiency

Always choose the implementation with the best space and time complexity.


import sweet_swift

// Now you can use the features introduced by this library
// Some of the examples:

var num = 0
// unary increment
// unary decrement

var string = "abc"
// integer indexing for string
// indexing acts as deleting
string[0..<2] = nil


  • Unary Increment and Decrement Operator
  • Integer String Indexing
  • Find SubString More Easily

How to Contribute

Contribute Code

  • Follow the Design Principles
  • Each Commit Should Serve Only One Purpose

Contribute Ideas

  • Raise Issues to Suggest New Features and Ideas to Me

About Me

Hi, I’m Yanzhan . I’m interested in all kinds of algorithmic problems. If you want to learn more about algorithmic problems, please visit my Youtube Channel ?, Twitter Account ?, GitHub Repo ? or My HomePage ?.


View Github