{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/1988","repository_url":"https://api.github.com/repos/rust-lang/rfcs","labels_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1988/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1988/comments","events_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1988/events","html_url":"https://github.com/rust-lang/rfcs/issues/1988","id":225828440,"number":1988,"title":"Case-insensitive matching without external crates","user":{"login":"clarcharr","id":15850505,"avatar_url":"https://avatars1.githubusercontent.com/u/15850505?v=4","gravatar_id":"","url":"https://api.github.com/users/clarcharr","html_url":"https://github.com/clarcharr","followers_url":"https://api.github.com/users/clarcharr/followers","following_url":"https://api.github.com/users/clarcharr/following{/other_user}","gists_url":"https://api.github.com/users/clarcharr/gists{/gist_id}","starred_url":"https://api.github.com/users/clarcharr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clarcharr/subscriptions","organizations_url":"https://api.github.com/users/clarcharr/orgs","repos_url":"https://api.github.com/users/clarcharr/repos","events_url":"https://api.github.com/users/clarcharr/events{/privacy}","received_events_url":"https://api.github.com/users/clarcharr/received_events","type":"User","site_admin":false},"labels":[{"id":211667886,"url":"https://api.github.com/repos/rust-lang/rfcs/labels/T-lang","name":"T-lang","color":"bfd4f2","default":false},{"id":211667901,"url":"https://api.github.com/repos/rust-lang/rfcs/labels/T-libs","name":"T-libs","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-05-02T21:34:20Z","updated_at":"2018-04-26T08:14:15Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I see a fair amount of code that does something to the extent of:\r\n\r\n```\r\nmatch s.to_lowercase().as_ref() {\r\n    \"string1\" | \"string2\" => ...,\r\n    \"something\" | \"else\" => ...,\r\n}\r\n```\r\n\r\nAnd it'd be really nice if we could provide a way to do this with libstd or even libcore without requiring a crate like `regex` to do the heavy lifting.\r\n\r\nWe already have `eq_ascii_ignore_case` but no equivalent with full unicode support, and there seems to be no easy way to do efficient, case-insensitive matching without allocating short of doing something ridiculous like:\r\n\r\n```\r\nlet cs = s.chars().map(char::to_lowercase);\r\nmatch cs.next() {\r\n    Some('s') | Some('S') => match cs.next() {\r\n        // ...\r\n    },\r\n    Some('e') | Some('E') => match cs.next() {\r\n        // ...\r\n    }\r\n    None => ...,\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/comments/384553419","html_url":"https://github.com/rust-lang/rfcs/issues/1988#issuecomment-384553419","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1988","id":384553419,"user":{"login":"Centril","id":855702,"avatar_url":"https://avatars2.githubusercontent.com/u/855702?v=4","gravatar_id":"","url":"https://api.github.com/users/Centril","html_url":"https://github.com/Centril","followers_url":"https://api.github.com/users/Centril/followers","following_url":"https://api.github.com/users/Centril/following{/other_user}","gists_url":"https://api.github.com/users/Centril/gists{/gist_id}","starred_url":"https://api.github.com/users/Centril/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Centril/subscriptions","organizations_url":"https://api.github.com/users/Centril/orgs","repos_url":"https://api.github.com/users/Centril/repos","events_url":"https://api.github.com/users/Centril/events{/privacy}","received_events_url":"https://api.github.com/users/Centril/received_events","type":"User","site_admin":false},"created_at":"2018-04-26T08:14:15Z","updated_at":"2018-04-26T08:14:15Z","author_association":"CONTRIBUTOR","body":"Triage ping: Any progress on this?"}}
{"actor":{"display_login":"Centril"}}