7 kyu

L2: Triple X

2,723 of 4,981Swolebrain

Description:

Given a string, return true if the first instance of "x" in the string is immediately followed by the string "xx".

"abraxxxas" → true
"xoxotrololololololoxxx" → false
"softX kitty, warm kitty, xxxxx" → true
"softx kitty, warm kitty, xxxxx" → false

Note :

  • capital X's do not count as an occurrence of "x".
  • if there are no "x"'s then return false
Strings
Regular Expressions
Fundamentals

Similar Kata:

More By Author:

Check out these other kata created by Swolebrain

Stats:

CreatedJan 7, 2016
PublishedJan 7, 2016
Warriors Trained6916
Total Skips121
Total Code Submissions20656
Total Times Completed4981
JavaScript Completions2723
Python Completions2010
Clojure Completions29
Haskell Completions58
Rust Completions197
CoffeeScript Completions13
C Completions88
COBOL Completions6
Total Stars60
% of votes with a positive feedback rating94% of 854
Total "Very Satisfied" Votes771
Total "Somewhat Satisfied" Votes67
Total "Not Satisfied" Votes16
Total Rank Assessments63
Average Assessed Rank
7 kyu
Highest Assessed Rank
3 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • Swolebrain Avatar
  • gperales Avatar
  • NateBrady23 Avatar
  • imjasonmiller Avatar
  • JohanWiltink Avatar
  • rsa Avatar
  • cliffstamp Avatar
  • trashy_incel Avatar
  • username0 Avatar
  • ejini战神 Avatar
  • Puck Avatar
  • akar-0 Avatar
  • Rocketboomer Avatar
Ad