question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

REPL: uppercase strings have different colors than lowercase

See original GitHub issue
scala> "lowercase"
res16: String = lowercase
scala> "UPPERCASE"
res17: String = UPPERCASE
scala> "lower UPPER lower"
res18: String = lower UPPER lower

2016-11-07_414x156

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
smartercommented, Nov 7, 2016

I think the correct thing to do here is to print the string with " around it, as a bonus this means that the output of the repl is valid Scala, but it also means that we have to escape our output, e.g.

scala> "\""
res0: String = " // Currently
res0: String = "\"" // Proposed behavior

I think that’s a trade-off worth making

1reaction
lihaoyicommented, Nov 10, 2016

Oh ok. I think all the non-derivation parts of the library are great:

  • The code to pretty-print strings, collections, primitives, case clases
  • That the printer returns an Iterator[String] instead of a plain String (though maybe it should return a geny.Generator at some point)
  • The code formatting things single/multi-line
  • Colors

All that stuff is nice 😃 and there to use. If we could hook it up to some non-gnarly derivation mechanism we’d be all set

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - Color words in sentence that are uppercase different color
I am a beginner with java but this is what I have come up with so far. The problem is that it is...
Read more >
Solved: How to check for upper-case strings - Alteryx Community
- This works because if text A starts with text B; AND text B starts with text A, then they are equal. But...
Read more >
6 Basic String Manipulations | Handling Strings with R
Besides creating and printing strings, there are a number of very handy ... The function tolower() converts any upper case characters into lower...
Read more >
uppercase - Replit
You can use .upper() for converting a string into all uppercase. You can also use .lower() to convert it all to lowercase. please...
Read more >
4 ways for changing case in Excel - Ablebits
In this article I'd like to tell you about different ways to change Excel uppercase to lowercase or proper case. You'll learn how...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found