有没有办法在 f# 中获取 URL 和进一步的参数值只有 F# 任何人都可以帮助我。我尝试了很多但没有找到解决方案
http://www.example.com/blog?blogid=23
想获取http://www.example.com/blog?blogid=23
然后 23
有没有办法在 f# 中获取 URL 和进一步的参数值只有 F# 任何人都可以帮助我。我尝试了很多但没有找到解决方案
http://www.example.com/blog?blogid=23
想获取http://www.example.com/blog?blogid=23
然后 23
let getBlogId uriString =
let uri = System.Uri(uriString)
let kvps = HttpUtility.ParseQueryString uri.Query
let idStr = kvps.["blogid"]
int idStr
let uri = new System.Uri("http://www.example.com/blog?blogid=23")
let blogId = uri.Query.Split('=').[1]