https://play.golang.org/p/gZFodmTXtS
Peter
On Fri, Jan 9, 2015 at 5:33 AM, C Banning wrote:
http://play.golang.org/p/PTqUFl2cjE
On Thursday, January 8, 2015 at 6:16:44 AM UTC-6, [email protected]
wrote:
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
For more options, visit https://groups.google.com/d/optout.
--http://play.golang.org/p/PTqUFl2cjE
On Thursday, January 8, 2015 at 6:16:44 AM UTC-6, [email protected]
wrote:
I have a string "hello <format> world" and I need to split it based on
multiple characters "<> ". How do I get this ?
One option is:
strings.FieldsFunc("hello <format> world", func (r rune) bool {
return r == '<' || r == '>'
})
But this gives ["hello","format","world"].
Is there a way to retain even the delimiters also in this list?
--
You received this message because you are subscribed to the Google Groupsmultiple characters "<> ". How do I get this ?
One option is:
strings.FieldsFunc("hello <format> world", func (r rune) bool {
return r == '<' || r == '>'
})
But this gives ["hello","format","world"].
Is there a way to retain even the delimiters also in this list?
--
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
For more options, visit https://groups.google.com/d/optout.
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 [email protected].
For more options, visit https://groups.google.com/d/optout.