Skip to main content
typo fix
Source Link
Neil
  • 177.3k
  • 12
  • 74
  • 281

Charcoal, 21 bytes

⭆S⎇№aeiouι§⁺↥ιιL⊞Oυιι

Try it online! Link is to verbose version of code. Explanation:

 S                      Input string
⭆                       Map over characters and join
   №                    Count of
         ι              Current character
    aeiou               In literal string `aeiou`
  ⎇                     If exists then
             ι          Current character
            ↥           UppercaeUppercase
           ⁺            Plus
              ι         Current character
          §             Indexed by
                   ι    Current character
                ⊞O      Pushed to
                  υ     Predefined empty list
               L        Length after push
                    ι   Otherwise current character
                        Implicitly print

Charcoal, 21 bytes

⭆S⎇№aeiouι§⁺↥ιιL⊞Oυιι

Try it online! Link is to verbose version of code. Explanation:

 S                      Input string
⭆                       Map over characters and join
   №                    Count of
         ι              Current character
    aeiou               In literal string `aeiou`
  ⎇                     If exists then
             ι          Current character
            ↥           Uppercae
           ⁺            Plus
              ι         Current character
          §             Indexed by
                   ι    Current character
                ⊞O      Pushed to
                  υ     Predefined empty list
               L        Length after push
                    ι   Otherwise current character
                        Implicitly print

Charcoal, 21 bytes

⭆S⎇№aeiouι§⁺↥ιιL⊞Oυιι

Try it online! Link is to verbose version of code. Explanation:

 S                      Input string
⭆                       Map over characters and join
   №                    Count of
         ι              Current character
    aeiou               In literal string `aeiou`
  ⎇                     If exists then
             ι          Current character
            ↥           Uppercase
           ⁺            Plus
              ι         Current character
          §             Indexed by
                   ι    Current character
                ⊞O      Pushed to
                  υ     Predefined empty list
               L        Length after push
                    ι   Otherwise current character
                        Implicitly print
Source Link
Neil
  • 177.3k
  • 12
  • 74
  • 281

Charcoal, 21 bytes

⭆S⎇№aeiouι§⁺↥ιιL⊞Oυιι

Try it online! Link is to verbose version of code. Explanation:

 S                      Input string
⭆                       Map over characters and join
   №                    Count of
         ι              Current character
    aeiou               In literal string `aeiou`
  ⎇                     If exists then
             ι          Current character
            ↥           Uppercae
           ⁺            Plus
              ι         Current character
          §             Indexed by
                   ι    Current character
                ⊞O      Pushed to
                  υ     Predefined empty list
               L        Length after push
                    ι   Otherwise current character
                        Implicitly print