0001 // 0002 // StringForegroundColorizer.swift 0003 // StringForegroundColorizer 0004 // 0005 // Created by Omar Abdelhafith on 31/10/2015. 0006 // Copyright © 2015 Omar Abdelhafith. All rights reserved. 0007 // 0008 0009 0010 extension String { 0011 0012 public struct StringForegroundColorizer{ 0013 0014 let string
Colorizer.swift:13 public var f: StringForegroundColorizer {Colorizer.swift:19 return StringForegroundColorizer(string: self)Colorizer.swift:18 public var foreground: StringForegroundColorizer {: String 0015 0016 public var Black: String { 0017 return Colorizer(string: string, color: ForegroundColor.Black).description 0018 } 0019 0020 public var Red: String { 0021 return Colorizer(string: string, color: ForegroundColor.Red).description 0022 } 0023 0024 public var Green: String { 0025 return Colorizer(string: string, color: ForegroundColor.Green).description 0026 } 0027 0028 public var Yellow: String { 0029 return Colorizer(string: string, color: ForegroundColor.Yellow).description 0030 } 0031 0032 public var Blue: String { 0033 return Colorizer(string: string, color: ForegroundColor.Blue).description 0034 } 0035 0036 public var Magenta: String { 0037 return Colorizer(string: string, color: ForegroundColor.Magenta).description 0038 } 0039 0040 public var Cyan: String { 0041 return Colorizer(string: string, color: ForegroundColor.Cyan).description 0042 } 0043 0044 public var White: String { 0045 return Colorizer(string: string, color: ForegroundColor.White).description 0046 } 0047 } 0048 0049 }
StringForegroundColorizer.swift:17 return Colorizer(string: string, color: ForegroundColor.Black).descriptionStringForegroundColorizer.swift:21 return Colorizer(string: string, color: ForegroundColor.Red).descriptionStringForegroundColorizer.swift:25 return Colorizer(string: string, color: ForegroundColor.Green).descriptionStringForegroundColorizer.swift:29 return Colorizer(string: string, color: ForegroundColor.Yellow).descriptionStringForegroundColorizer.swift:33 return Colorizer(string: string, color: ForegroundColor.Blue).descriptionStringForegroundColorizer.swift:37 return Colorizer(string: string, color: ForegroundColor.Magenta).descriptionStringForegroundColorizer.swift:41 return Colorizer(string: string, color: ForegroundColor.Cyan).descriptionStringForegroundColorizer.swift:45 return Colorizer(string: string, color: ForegroundColor.White).description