1
0
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:
Alexander Medvednikov
2019-12-09 17:10:44 +03:00
parent 32b0225079
commit 6f49d4c1d2
6 changed files with 36 additions and 15 deletions

View File

@@ -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))