c5a6a44b55
The snippet: boolean wrapNeeded = false; if (wrap && nextIndex == -1) { // if wrapping, a second chance is ok, start from the end wrapNeeded = true; } Can be moved inside the `if (nextIndex == -1)` that follows, this way: if (nextIndex == -1) { boolean wrapNeeded = false; if (wrap) { // if wrapping, a second chance is ok, start from the end wrapNeeded = true; } [...CUT...] if (wrapNeeded) { nextIndex = backwards ? text.lastIndexOf(search) : text.indexOf(search, 0); } } but since `wrapNeeded` is used only at the very end of the `if` statement we can move it forward: if (nextIndex == -1) { [...CUT...] boolean wrapNeeded = false; if (wrap) { // if wrapping, a second chance is ok, start from the end wrapNeeded = true; } if (wrapNeeded) { nextIndex = backwards ? text.lastIndexOf(search) : text.indexOf(search, 0); } } and finally simplify it by removing `wrapNeeded` altogether: if (nextIndex == -1) { [...CUT...] if (wrap) { nextIndex = backwards ? text.lastIndexOf(search) : text.indexOf(search, 0); } } |
||
---|---|---|
.settings | ||
app | ||
arduino-core | ||
build | ||
hardware | ||
libraries | ||
.classpath | ||
.gitignore | ||
.project | ||
examples_formatter.conf | ||
format.every.sketch.sh | ||
lib_sync | ||
license.txt | ||
README.md |
Arduino
-
Arduino is an open-source physical computing platform based on a simple I/O board and a development environment that implements the Processing/Wiring language. Arduino can be used to develop stand-alone interactive objects or can be connected to software on your computer (e.g. Flash, Processing and MaxMSP). The boards can be assembled by hand or purchased preassembled; the open-source IDE can be downloaded for free at http://www.arduino.cc/en/Main/Software
-
For more information, see the website at: http://www.arduino.cc/ or the forums at: http://www.arduino.cc/forum/
You can also follow Arduino on Twitter at: https://twitter.com/arduino or like Arduino on Facebook at: https://www.facebook.com/official.arduino -
To report a bug in the software or to request a simple enhancement go to: http://github.com/arduino/Arduino/issues
-
More complex requests and technical discussion should go on the Arduino Developers mailing list: https://groups.google.com/a/arduino.cc/forum/#!forum/developers
-
If you're interested in modifying or extending the Arduino software, we strongly suggest discussing your ideas on the Developers mailing list before starting to work on them. That way you can coordinate with the Arduino Team and others, giving your work a higher chance of being integrated into the official release https://groups.google.com/a/arduino.cc/forum/#!forum/developers
Installation
Detailed instructions are in reference/Guide_Windows.html and reference/Guide_MacOSX.html. For Linux, see the Arduino playground: http://www.arduino.cc/playground/Learning/Linux
Credits
Arduino is an open source project, supported by many.
The Arduino team is composed of Massimo Banzi, David Cuartielles, Tom Igoe and David A. Mellis.
Arduino uses GNU avr-gcc toolchain, GCC ARM Embedded toolchain, avr-libc, avrdude, bossac, openOCD and code from Processing and Wiring.
Icon and about image designed by ToDo