★ wanayoo — archive 1999 https://github.com/coffeescript-cookbook/coffeescript-cookbook.github.io/pull/140Nouvelle recherche | Portail wanayoo
Skip to content
New issue

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

Add new chapter: replacing sub-strings #140

Merged
merged 1 commit into from Feb 10, 2016

Conversation

@Data-Meister
Copy link
Contributor

@Data-Meister Data-Meister commented Jan 28, 2016

As discussed, here's a new chapter

@sukima
Copy link
Contributor

@sukima sukima commented Jan 29, 2016

Interesting alternative to RegExps. Most devs would lean to RegExps because it is familiar and expected. Insert comment about readability here.

Nit Picks

I think most of the code examples in this repo use double-quotes instead of single-quotes and they don't have spaces inside the parenthesis.

@Data-Meister Data-Meister force-pushed the Data-Meister:master branch from d9c3af2 to fdb756a Feb 9, 2016
@Data-Meister
Copy link
Contributor Author

@Data-Meister Data-Meister commented Feb 9, 2016

okay I've made the changes suggested

IMO this is simpler than RegExps because RegExps require you to escape certain characters.

This is especially problematic if you are using a RegExp on a variable string, because certain characters need to be double escaped

you're right it's less intuitive/readable. but at the other day, this is JavaScript. Other languages have this kind of thing built in

@sukima
Copy link
Contributor

@sukima sukima commented Feb 10, 2016

:shipit:

sukima added a commit that referenced this pull request Feb 10, 2016
Add new chapter: replacing sub-strings
@sukima sukima merged commit 4f1223a into coffeescript-cookbook:master Feb 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.