Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Challenge: Letter Counter | Fundamentals of Strings
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
C# Strings & Text Processing

bookChallenge: Letter Counter

In this chapter, you will deepen your understanding of string processing by taking on a practical challenge: counting the number of times a specific letter appears in a sentence, regardless of whether the letter is upper or lower case. This exercise builds on your experience with searching and counting occurrences in strings, but now requires you to handle case-insensitive comparisons. Being able to perform such operations is essential for many real-world text processing tasks, such as analyzing user input, validating data, or even building search features in applications.

Tarefa

Swipe to start coding

Count how many times a specified letter appears in a sentence, ignoring case.

  • Compare each character in sentence to letter in a case-insensitive manner.
  • Return the total number of matches found.
  • Only count occurrences where the character matches letter, regardless of case.

Solução

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 6
single

single

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

close

bookChallenge: Letter Counter

Deslize para mostrar o menu

In this chapter, you will deepen your understanding of string processing by taking on a practical challenge: counting the number of times a specific letter appears in a sentence, regardless of whether the letter is upper or lower case. This exercise builds on your experience with searching and counting occurrences in strings, but now requires you to handle case-insensitive comparisons. Being able to perform such operations is essential for many real-world text processing tasks, such as analyzing user input, validating data, or even building search features in applications.

Tarefa

Swipe to start coding

Count how many times a specified letter appears in a sentence, ignoring case.

  • Compare each character in sentence to letter in a case-insensitive manner.
  • Return the total number of matches found.
  • Only count occurrences where the character matches letter, regardless of case.

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 6
single

single

some-alt