We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://leetcode.com/problems/detect-capital/description/
The text was updated successfully, but these errors were encountered:
use std::str::Chars; impl Solution { pub fn detect_capital_use(word: String) -> bool { fn check_consistency(lower_flag: bool, mut chars: Chars) -> bool { while let Some(char) = chars.next() { if char.is_lowercase() != lower_flag { return false } } return true } let mut chars = word.chars(); let first_char = chars.next().unwrap(); if first_char.is_lowercase() { return check_consistency(true, chars) } if let Some(second_char) = chars.next() { return check_consistency(second_char.is_lowercase(), chars) } return true } }
Sorry, something went wrong.
No branches or pull requests
https://leetcode.com/problems/detect-capital/description/
The text was updated successfully, but these errors were encountered: