Iwark / spreadsheet

Google Go (golang) library for reading and writing spreadsheet files on Google Docs.
MIT License
382 stars 53 forks source link

feature request: NormalizeID #62

Open earthboundkid opened 1 year ago

earthboundkid commented 1 year ago

It would be nice to have a helper function to turn a URL into a normalized ID. I've written it myself a couple of times for different projects, but it seems like something that could be built in. I'm happy to open a PR if you're interested in this. A couple of different APIs are possible but the simplest seems like

// NormalizeID turns a Google Sheet URL into a normalized ID.
// It returns a normalized ID as is.
// If s does not look like a Google Sheet URL or a normalized ID, it returns "".
func NormalizeID(s string) string