Smartpaster
-
Smartpaster[^] allows you to paste as stringbuilder for example. Extremely useful when you're inlining SQL code.
Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions
-
Smartpaster[^] allows you to paste as stringbuilder for example. Extremely useful when you're inlining SQL code.
Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions
Yes, I've been using this for years. :thumbsup:
Kevin
-
Smartpaster[^] allows you to paste as stringbuilder for example. Extremely useful when you're inlining SQL code.
Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions
Reading the page suggests that it is going to paste a text block using StringBuilder which I can only assume means something like the following?
StringBuilder sb =.. sb.append("stuff"); sb.append(" other stuff");
That idiom of course isn't efficient for static text compared to...
String s = "stuff" + " other stuff";
-
Reading the page suggests that it is going to paste a text block using StringBuilder which I can only assume means something like the following?
StringBuilder sb =.. sb.append("stuff"); sb.append(" other stuff");
That idiom of course isn't efficient for static text compared to...
String s = "stuff" + " other stuff";
Looking at the code, it can paste either way or as a comment.
Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
-
Reading the page suggests that it is going to paste a text block using StringBuilder which I can only assume means something like the following?
StringBuilder sb =.. sb.append("stuff"); sb.append(" other stuff");
That idiom of course isn't efficient for static text compared to...
String s = "stuff" + " other stuff";
This question is not meant to be "picky-picky:" and I, personally, have no experience with the OP's mentioned use-case of "in-lining SQL," but, I think comparing a very brief example of using an example of StringBuilder versus string concatenation using "+" ... in "flat code:" i.e., outside a loop ... is not that particularly meaningful because: hypotheses: 1. it ignores the probable fact that at some point the StringBuilder will be converted to a string, which is going to cost you some cycles ? 2. at such a small scale of test, performance differences will be minuscule ... perhaps not even mensurable ? The main place I use StringBuilder is in loops that are parsing files, and doing something that's going to create a huge bunch of characters. It is rare, in my experience, to encounter other people's code where there are really long examples of string concatenation outside loops using "+," and code that does concatenation within the loop, using "+," in my experience, will be usually quite short. I will try PasteBuilder, and see what it does for me :) best, Bill
"Every two days we create as much information as we did from the dawn of civilization up until 2003". Eric Schmidt of Google.