Thursday, January 15, 2015

Multiple switch cases

Switch cases can be separated by coma:

    func shouldEscape(c byte) bool {
        switch c {
        case ' ', '?', '&', '=', '#', '+', '%':
            return true
            }
        return false
        }

No comments:

Post a Comment