[xquery-talk] solution of string manipulation message
Michael Kay
mhk at mhk.me.uk
Sun Feb 5 23:57:29 PST 2006
A better solution, that avoids calling tokenize twice, would be
let $str := "book/title/author"
let $toks := tokenize($str, '/')
let $p := subsequence($toks, 1, count($toks)-1)
return string-join($p, '/')
Michael Kay
http://www.saxonica.com/
> -----Original Message-----
> From: talk-bounces at xquery.com
> [mailto:talk-bounces at xquery.com] On Behalf Of fatma helmy
> Sent: 05 February 2006 23:27
> To: talk at xquery.com
> Subject: [xquery-talk] solution of string manipulation message
>
> dear all
> i did it
>
> let $str := "book/title/author"
> let
> $p:=string-join(subsequence(tokenize("book/title/author",
> "/"), 1, count(tokenize($str, "/")) -
> 1), "/") return $p
>
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> talk at xquery.com
> http://xquery.com/mailman/listinfo/talk
>
More information about the talk
mailing list