Giter VIP home page Giter VIP logo

second-round-march-20's Introduction

2nd Round: Getting Jiggy With It

I'm Will Smith's number one fan. I know all his lyrics. I have his complete works on DVD. Wherever I look, I see his name. And so on. I want to share my love for my idol and I'd like you to write a Ruby method to help me.

Given any string, this method will return a new string where each letter of Will's ("W","i","l" and "l") name is (highlighted) as they occur in the text. It will keep looking for and highlighting the letters until the end of the string.

For example, take this completely random string:

"In west Philadelphia born and raised On the playground was where I spent most of my days Chillin' out maxin' relaxin' all cool And all shootin some b-ball outside of the school When a couple of guys who were up to no good Started making trouble in my neighborhood I got in one little fight and my mom got scared She said 'You're movin' with your auntie and uncle in Bel Air"

I want the new string to look like this:

"In **(w)est Ph(i)(l)ade(l)**phia born and raised On the playground **(w)as where (I) spent most of my days Chi(l)(l)**in' out maxin' relaxin' all cool And all shootin some b-ball outside of the school **(W)hen a couple of guys who were up to no good Started mak(i)ng troub(l)**e in my neighborhood I got in one **(l)**ittle fight and my mom got scared She said 'You're movin' (w)(i)th your auntie and unc(l)e in Be(l) Air"

Ideally you will be writing tests as you go and thinking WWSMD? ("What would Sandi Metz do?"). Keep the TRUE principles in mind - particularly U for usable in new contexts. What if I want to change what the method does and highlight the letters "Will Smith", "Fresh Prince" or "Willard Carroll Smith, Jr." (all with or without the spaces)?

See how far you can get with this challenge and have fun!

As before:

  • Fork this repo to your own gitHub
  • Clone the fork on your local machine
  • Solve the problem
  • Commit changes
  • Push to your remote
  • Submit a pull request

second-round-march-20's People

Contributors

bk8296 avatar gabemaker avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.