Campbell Ritchie wrote:Don’t say if (...) return true; else return false;
Look here for what would be better style.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
No, it hasn’t got [][] inWinston Gutkowski wrote: . . . A variation on your favourite bête-noir? . . .
Marcus Setchell wrote:Just for clarification as it stands the method will only be used to match a 1 character String anyway so i think it should be fine.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Campbell Ritchie wrote:Are you absolutely sure it will always be a 1‑length String? What about...
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Marcus Setchell wrote:I didnt realise that it would make it faster and yes im passing data from a map file using - substring(offset, offset+1); inside a loop so it will be but i will make it more concise for performance purposes thanks again this is why i asked .
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Campbell Ritchie wrote:The boolean identity is to demonstrate you can use ¬a ∨ b instead of a ⇒ b.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Junilu Lacar wrote:Here's a variation that checks for that and assumes you only want uppercase letters in the English alphabet:
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |