mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
optimize a in [1,2,3] to a == 1 || a == 2 || a == 3
This commit is contained in:
@@ -629,12 +629,8 @@ pub fn (a []string) to_c() voidptr {
|
||||
}
|
||||
*/
|
||||
|
||||
fn is_space(c byte) bool {
|
||||
return c in [` `,`\n`,`\t`,`\v`,`\f`,`\r`]
|
||||
}
|
||||
|
||||
pub fn (c byte) is_space() bool {
|
||||
return is_space(c)
|
||||
return c in [` `,`\n`,`\t`,`\v`,`\f`,`\r`]
|
||||
}
|
||||
|
||||
pub fn (s string) trim_space() string {
|
||||
|
||||
Reference in New Issue
Block a user