FAQ
Hi everybody,

here is my code:

source is html-code (from GetHtml()). This works fine. But the second
Index()-call gets a smaller value then poss. Why?


func FetchMail(url string) {
  25
  26 mailto := "mailto:"
  27 source := GetHtml(url)
  28
  29 poss := strings.Index(source, mailto)
  30 pose := strings.Index(source[poss + len(mailto):], "\"")
  31
  32 fmt.Println(poss, " ", pose )
  33 //s := source[poss + len(mailto):]
  34
  35
  36 //FetchMail(url)
  37 }

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedMar 27, '16 at 7:56p
activeMar 27, '16 at 8:31p
posts2
users2
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase