Skip to content

Instantly share code, notes, and snippets.

View aciidgh's full-sized avatar

Ankit Aggarwal aciidgh

View GitHub Profile
@aciidgh
aciidgh / trim.swift
Last active December 28, 2015 18:04 — forked from erica/trim.swift
extension String {
func trimBackTo(boundary: Character) -> String {
if isEmpty {return ""}
if self[endIndex.predecessor()] == boundary { return "" }
return characters.split(boundary).map(String.init).last!
}
func trimUpTo(boundary: Character) -> String {
if isEmpty { return "" }
@aciidgh
aciidgh / XCPlaygroundPage.playground
Created December 4, 2015 20:56
Use of unresolved identifier 'XCPlaygroundPage'
//: Playground - noun: a place where people can play
import UIKit
import XCPlayground
class VC: UIViewController {
let newView = UIView()
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)