mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
orm: bool support; vweb fixes
This commit is contained in:
@@ -190,6 +190,9 @@ pub fn (s string) replace(rep, with string) string {
|
||||
return tos(b, new_len)
|
||||
}
|
||||
|
||||
pub fn (s string) bool() bool {
|
||||
return s == 'true' || s == 't' // TODO t for pg, remove
|
||||
}
|
||||
|
||||
pub fn (s string) int() int {
|
||||
return int(strconv.common_parse_int(s,0,32, false, false))
|
||||
|
||||
Reference in New Issue
Block a user