v / examples
Raw file | 14 loc (13 sloc) | 248 bytes | Latest commit hash 84a6c019e
1import net.http
2
3fn main() {
4 html := http.get_text('https://news.ycombinator.com')
5 mut pos := 0
6 for {
7 pos = html.index_after('https://', pos + 1)
8 if pos == -1 {
9 break
10 }
11 end := html.index_after('"', pos)
12 println(html[pos..end])
13 }
14}