GithubHelp home page GithubHelp logo

string-in-chain's People

Contributors

dhoerl avatar dhoerlsb avatar lsolniczek avatar marcinwyszynski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

string-in-chain's Issues

Swift-2.0

can you create a swift 2.0 branch with the new syntax changes?

Should obfuscate email

Your email is in plain text and can easily be harvested by spammers - I suggest obfuscating it using "dot" and "at" or similar.

Suggest change to to make stringToMatch optional, then match() matches the whole string.

I made the 3 changes below to my fork - now I can use for example:

string.match().withFont(CSLeftColumnCell.nameFont).attrString

Since its fairly easy to append one attributed string to another, I build up my final string a bit at a time, using the above on each segment.

In any case" Brilliant Piece of Work!

init(string: String, stringToMatch: String?) {  // DFH: String -> String?
    self.baseText = string
    self.stringToMatch = stringToMatch
    self.attrString = NSMutableAttributedString(string: string)
}

func setRange() -> NSRange {
    if let stringToMatch = stringToMatch {      // DFH: was "stringToMatch as String?"
        return baseText.rangeOfString(stringToMatch)
    }
    return baseText.rangeOfString(baseText as String)
}

public func match(string: String? = nil) -> StringInChain { // DFH: added "? = nil"
    return StringInChain(string: self, stringToMatch: string)
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.