100+ results for 'trim toLowerCase'

Not the results you expected?

hook.cors_csrf.test.js (https://gitlab.com/yutiansut/sails) JavaScript · 1310 lines

254 assert.equal(response.statusCode, 200);

255 assert.equal(response.headers['access-control-allow-origin'], 'http://www.example.com');

256 assert.equal(response.headers['access-control-allow-methods'].toLowerCase(), 'get, post, put, delete, options, head');

257 done();

258 });

274 assert.equal(response.statusCode, 200);

275 assert.equal(response.headers['access-control-allow-origin'], 'http://www.example.com');

276 assert.equal(response.headers['access-control-allow-methods'].toLowerCase(), 'get, post, put, delete, options, head');

277 done();

278 });

sessionManager.js (https://github.com/deitch/cansecurity.git) JavaScript · 305 lines

281 clear: endSession,

282 message: ( res ) => {

283 const p = res.headers ? ( res.headers[ AUTHHEADER ] || res.headers[ AUTHHEADER.toLowerCase() ] || "" ) : "",

284 match = MSGRE.exec( p ),

285 msg = match && match.length > 1 && match[ 1 ].length > 0 ? match[ 1 ] : "";

FictionController.groovy (https://github.com/TouK/RapidOSS3TouK.git) Groovy · 245 lines

47 if (controllerName.length() == 1)

48 {

49 controllerName = controllerName.toLowerCase();

50 }

51 else

52 {

53 controllerName = controllerName.substring(0, 1).toLowerCase() + controllerName.substring(1);

54 }

55 redirect(action: show, controller: controllerName, id: params.id)

ContentImportManager.java (https://github.com/jehc/MondocosmOS.git) Java · 172 lines

116 }

117

118 contentImportMap.put(extension.toLowerCase(), importer);

119 }

120 }

136 }

137

138 ContentImporterSPI curImporter = contentImportMap.get(extension.toLowerCase());

139

140 // XXX the use of .equals() here is problematic -- it

142 // if unregister is called after register XXX

143 if (curImporter != null && curImporter.equals(importer)) {

144 contentImportMap.remove(extension.toLowerCase());

145 }

146 }

ConfigurationClassBuilder.java (https://github.com/ccrouch/rhq.git) Java · 158 lines

101

102 private static String decapitalize(String name) {

103 return Character.toLowerCase(name.charAt(0)) + name.substring(1, name.length());

104 }

105

DAOParamUtil.java (https://github.com/viktorkovacs/liferay-portal-trunk.git) Java · 239 lines

122

123 public static String getLike(

124 HttpServletRequest request, String param, boolean toLowerCase) {

125

126 return getLike(request, param, null, toLowerCase);

135 public static String getLike(

136 HttpServletRequest request, String param, String defaultValue,

137 boolean toLowerCase) {

138

139 String value = request.getParameter(param);

140

141 if (value != null) {

142 value = value.trim();

143

144 if (toLowerCase) {

Room.java (https://bitbucket.org/teamchromide/habbo-4-java.git) Java · 151 lines

106

107 for (int x = 0; x < m.getLimitX(); x++) {

108 String sq = lines[y].substring(x, x + 1).trim().toLowerCase();

109

110 if (sq.equals("x")) {

setting.js (https://github.com/TomTasche/Announcify.js.git) JavaScript · 645 lines

37 }

38

39 this.params.searchString = this.params.searchString.toLowerCase();

40 },

41

119 this.addEvents();

120

121 this.params.searchString = this.params.searchString.toLowerCase();

122 },

123

295 }

296

297 this.params.searchString = this.params.searchString.toLowerCase();

298 },

299

components-dropdowns.js (https://gitlab.com/SFMSP/Hagape) JavaScript · 263 lines

37 function format(state) {

38 if (!state.id) return state.text; // optgroup

39 return "<img class='flag' src='" + App.getGlobalImgPath() + "flags/" + state.id.toLowerCase() + ".png'/>&nbsp;&nbsp;" + state.text;

40 }

41 $("#select2_sample4").select2({

153 function format(state) {

154 if (!state.id) return state.text; // optgroup

155 return "<img class='flag' src='" + App.getGlobalImgPath() + "flags/" + state.id.toLowerCase() + ".png'/>&nbsp;&nbsp;" + state.text;

156 }

157 $("#select2_sample_modal_4").select2({

pollResult.jsp (https://bitbucket.org/NightFury_37/poll.git) JavaServer Pages · 141 lines

25 for (Choice choice : question.getChoices()) {

26 int usersSize = choice.getNumberOfUsers();

27 if (action.trim().toLowerCase().equals(choice.toString().trim().toLowerCase())) {

28 choice.addUserVote(new User(request.getParameter("voterName")));

29 if (usersSize != choice.getNumberOfUsers()) {

Create_Constructor.bsh (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 222 lines

18 */

19

20 boolean JAVA_MODE = buffer.getMode().getName().toLowerCase().equals("java");

21 String UNDEFINED = "UNKNOWN_CLASS";

22

56 {

57 fileClassName = fileClassName.substring(0, index);

58 if(fileClassName.toLowerCase().indexOf("untitled") == -1)

59 {

60 return fileClassName;

156 if( lineText != null && !lineText.equals("") )

157 {

158 lineText = lineText.trim();

159 if( lineText.endsWith(";") )

160 {

ShortcutsOptionPane.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 443 lines ✨ Summary

This Java code creates a graphical user interface (GUI) for managing shortcuts in an application. It allows users to add, edit, and delete shortcuts, with options to customize their names and shortcuts. The GUI displays a table of existing shortcuts, enabling users to modify them as needed. The code also saves changes to the shortcuts when the user clicks “OK”.

173 public String prepareFilter(String filter)

174 {

175 return filter.toLowerCase();

176 }

177

179 public boolean passFilter(int row, String filter)

180 {

181 String name = delegated.getBindingAt(row, 0).label.toLowerCase();

182 return name.contains(filter);

183 }

408 public int compare(GrabKeyDialog.KeyBinding[] k1, GrabKeyDialog.KeyBinding[] k2)

409 {

410 String label1 = k1[0].label.toLowerCase();

411 String label2 = k2[0].label.toLowerCase();

api.test.js (https://github.com/nanek/mstranslator.git) JavaScript · 208 lines

86 var params = {text: 'translate this.', from: 'en', to: 'es'};

87 translator.translate(params, function (err, data) {

88 assert.equal(data.toLowerCase(), 'traducir esto.');

89 done();

90 });

base-core-tests.js (https://github.com/ArnaudD/yui3.git) JavaScript · 1233 lines

215 value:"ExtEVal",

216 getter: function(val) {

217 return (Y.Lang.isString(val)) ? val.toLowerCase() : val;

218 }

219 },

textbox.js (https://github.com/sundowndk/SNDK.git) JavaScript · 802 lines

687 var result = _attributes.value;

688

689 switch (_attributes.textTransform.toLowerCase ())

690 {

691 case "uppercase":

702 {

703

704 switch (_attributes.textTransform.toLowerCase ())

705 {

706 case "uppercase":

GrabKeyDialog.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 544 lines ✨ Summary

This Java code creates a dialog for setting and managing keyboard shortcuts. It allows users to input a shortcut, check if it’s already in use, and override existing shortcuts. The dialog also includes options to remove an old shortcut, cancel changes, and confirm duplicate shortcuts. It uses a custom ActionHandler class to handle user interactions and display error messages or confirmation prompts as needed.

244

245 if(keyCode >= KeyEvent.VK_A && keyCode <= KeyEvent.VK_Z)

246 return String.valueOf(Character.toLowerCase((char)keyCode));

247

248 try

jEdit.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 3463 lines ✨ Summary

This Java code initializes various objects and sets up the application’s configuration. It loads system properties, registers protocol handlers, and sets the User-Agent string for HTTP requests. The code also determines the installation directory of the application and sets up a class loader to load JAR files. Additionally, it creates an input handler and adds an EditBus component to reload edit modes and macros when changed.

524 try

525 {

526 return Integer.parseInt(value.trim());

527 }

528 catch(NumberFormatException nf)

543 try

544 {

545 return Double.parseDouble(value.trim());

546 }

547 catch(NumberFormatException nf)

ExitOperationsCriteriaCollector.java (https://github.com/donnchadh/hibernate-shards.git) Java · 192 lines

109 this.rowCountProjection = (RowCountProjection) projection;

110 } else if(projection instanceof AggregateProjection) {

111 if (projection.toString().toLowerCase().startsWith("avg")) {

112 this.avgProjection = (AggregateProjection) projection;

113 } else {

GetterUtil.java (https://github.com/portalcollc/liferay-portal.git) Java · 1029 lines

284

285 try {

286 value = value.trim().toLowerCase();

287

288 if (value.equals(BOOLEANS[0]) || value.equals(BOOLEANS[1]) ||

310

311 try {

312 Date date = dateFormat.parse(value.trim());

313

314 if (date != null) {

325 if (value != null) {

326 try {

327 return Double.parseDouble(_trim(value));

328 }

329 catch (Exception e) {

powerdynamo.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 465 lines

401 <KEYWORD3>status</KEYWORD3>

402 <KEYWORD3>timeOut</KEYWORD3>

403 <KEYWORD3>toLowerCase</KEYWORD3>

404 <KEYWORD3>toUpperCase</KEYWORD3>

405 <KEYWORD3>type</KEYWORD3>

KeyEventTranslator.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 545 lines ✨ Summary

This Java code defines a system for handling keyboard events, specifically key presses and releases, in a graphical user interface (GUI) application. It maps keyboard input to specific actions and provides a way to track which keys are pressed simultaneously, allowing for more accurate event tracking and processing. The code also includes a Key class to represent individual key press events.

107 returnValue = new Key(

108 modifiersToString(modifiers),

109 '\0',Character.toLowerCase(

110 (char)keyCode));

111 }

OAuth20AccessTokenControllerTests.java (https://github.com/frett/cas.git) Java · 645 lines

50 mockRequest.setParameter(OAuth20Constants.REDIRECT_URI, REDIRECT_URI);

51 mockRequest.setParameter(OAuth20Constants.CLIENT_SECRET, CLIENT_SECRET);

52 mockRequest.setParameter(OAuth20Constants.GRANT_TYPE, OAuth20GrantTypes.AUTHORIZATION_CODE.name().toLowerCase());

53 val principal = createPrincipal();

54 val service = addRegisteredService(

69 mockRequest.setParameter(OAuth20Constants.CLIENT_ID, CLIENT_ID);

70 mockRequest.setParameter(OAuth20Constants.CLIENT_SECRET, CLIENT_SECRET);

71 mockRequest.setParameter(OAuth20Constants.GRANT_TYPE, OAuth20GrantTypes.AUTHORIZATION_CODE.name().toLowerCase());

72 val principal = createPrincipal();

73 val service = addRegisteredService(

147 mockRequest.setParameter(OAuth20Constants.CLIENT_ID, CLIENT_ID);

148 mockRequest.setParameter(OAuth20Constants.REDIRECT_URI, REDIRECT_URI);

149 mockRequest.setParameter(OAuth20Constants.GRANT_TYPE, OAuth20GrantTypes.AUTHORIZATION_CODE.name().toLowerCase());

150 val principal = createPrincipal();

151 val service = addRegisteredService(

CBRoot.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 304 lines ✨ Summary

This Java code is part of a CodeBrowser application, which parses ctags files to generate a tree-like structure representing file contents and their corresponding tags. It creates child nodes based on the parsed data and provides methods for expanding paths and sorting children in a JTree component. The class implements the TreeNode interface to provide access to its children and other properties.

79 boolean buildxml=false;

80

81 if(path.toLowerCase().endsWith("build.xml")) buildxml=true;

82

83 try

MaximalBodyDescriptor.java (https://github.com/mkautzmann/titanium_mobile.git) Java · 399 lines

106

107 public void addField(String name, String value) {

108 name = name.trim().toLowerCase();

109 if (MimeUtil.MIME_HEADER_MIME_VERSION.equals(name) && !isMimeVersionSet) {

110 parseMimeVersion(value);

129 isContentMD5Set = true;

130 if (value != null) {

131 contentMD5Raw = value.trim();

132 }

133 }

216 contentDescription = "";

217 } else {

218 contentDescription = value.trim();

219 }

220 isContentDescriptionSet = true;

PasteFromListDialog.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 263 lines ✨ Summary

This Java code creates a dialog for pasting text from a list of clips. The dialog displays a list of available clips, and allows the user to select one to paste into the current editor’s text area. When the “Insert” button is clicked, the selected clip is inserted at the cursor position in the text area.

186 // workaround for Swing rendering labels starting

187 // with <html> using the HTML engine

188 if(item.toLowerCase().startsWith("<html>"))

189 buf.append(' ');

190 boolean ws = true;

GUIUtilities.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 1789 lines ✨ Summary

This Java code provides utility methods for a text editor, specifically for GUI-related tasks. It includes functionality for displaying a splash screen, advancing its progress, and saving the size of frames and windows. The SizeSaver class is used to continually save a frame’s size when it is resized or moved.

375 if(index != -1 && label.length() - index > 1)

376 {

377 mnemonic = Character.toLowerCase(label.charAt(index + 1));

378 label = label.substring(0,index).concat(label.substring(++index));

379 }

409 if(index != -1 && label.length() - index > 1)

410 {

411 mnemonic = Character.toLowerCase(label.charAt(index + 1));

412 label = label.substring(0,index).concat(label.substring(++index));

413 }

988 String styleName = "view.style."

989 + Token.tokenToString((byte)i)

990 .toLowerCase(Locale.ENGLISH);

991 styles[i] = GUIUtilities.parseStyle(

992 jEdit.getProperty(styleName),

SettingsReloader.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 95 lines ✨ Summary

This Java class, SettingsReloader, is a utility component that reloads macros and modes when necessary. It listens for VFSUpdate messages from the JEdit editor and checks if the updated path belongs to either the “macros” or “modes” directories. If it does, it calls methods to load or reload the corresponding settings.

56 & VFS.CASE_INSENSITIVE_CAP) != 0)

57 {

58 path = path.toLowerCase();

59 jEditHome = jEditHome.toLowerCase();

60 settingsDirectory = settingsDirectory.toLowerCase();

61 }

62

bootstrap-material-design.css (https://gitlab.com/adamm0/swedish) CSS · 1389 lines

9 var colors = {}, main = {};

10 $(".color-group").each(function() {

11 var color = $(this).find(".name").text().trim().toLowerCase().replace(" ", "-");

12 colors[color] = {};

13

14 $(this).find(".color").not(".main-color").each(function() {

15 var shade = $(this).find(".shade").text().trim(),

16 hex = $(this).find(".hex").text().trim();

18 colors[color][shade] = hex;

19 });

20 main[color] = color + "-" + $(this).find(".main-color .shade").text().trim();

21

22 });

Censor.java (https://github.com/gamerx/tgxn317.git) Java · 978 lines

129 char ac[] = s.toCharArray();

130 method495(ac);

131 String s1 = (new String(ac)).trim();

132 ac = s1.toLowerCase().toCharArray();

133 String s2 = s1.toLowerCase();

134 method505(ac);

135 method500(ac);

Os.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 426 lines ✨ Summary

This Java code provides a way to determine and manipulate environment variables on different operating systems. It checks the system’s family (e.g., Windows, Unix, NetWare) and uses specific commands to retrieve and set environment variables. The getEnvironmentValue method retrieves the value of an environment variable, while the getProcEnvCommand method returns a command to execute to get environment variables on different systems.

73 public class Os {

74 private static final String OS_NAME =

75 System.getProperty( "os.name" ).toLowerCase( Locale.US );

76 private static final String OS_ARCH =

77 System.getProperty( "os.arch" ).toLowerCase( Locale.US );

78 private static final String OS_VERSION =

79 System.getProperty( "os.version" ).toLowerCase( Locale.US );

80 private static final String PATH_SEP =

81 System.getProperty( "path.separator" );

122 */

123 public void setFamily( String f ) {

124 family = f.toLowerCase( Locale.US );

125 }

126

Parser.js (https://github.com/tomelam/parser-lib.git) JavaScript · 1341 lines

388

389 if (tokenStream.match(Tokens.IDENT)){

390 ident = tokenStream.token().value.toLowerCase();

391

392 //since there's no custom tokens for these, need to manually check

418 this._readWhitespace();

419 while (tokenStream.match(Tokens.IDENT)){

420 if (tokenStream.token().value.toLowerCase() != "and"){

421 this._unexpectedToken(tokenStream.token());

422 }

515

516 //The value 'auto' may not be used as a page name and MUST be treated as a syntax error.

517 if (identifier.toLowerCase() === "auto"){

518 this._unexpectedToken(tokenStream.token());

519 }

VMSMyDAO.java (https://github.com/rkshakya/RKSProjects.git) Java · 1277 lines

92 if(serverName.toLowerCase().indexOf(VMSStaticParams.APACBEALIAS) > -1){

93 serverName = serverName.toLowerCase().replaceAll(VMSStaticParams.APACBEALIAS.toLowerCase(), "");

94 }else if(serverName.toLowerCase().indexOf(VMSStaticParams.APACFEALAIS) > -1){

95 serverName = serverName.toLowerCase().replaceAll(VMSStaticParams.APACFEALAIS.toLowerCase(), "");

96 }

97

Bundle.properties (https://bitbucket.org/alsajib/netbeans-soa.git) Properties File · 584 lines

40 #Operator tolowercase

41 LBL_String_tolowercase = ToLowercase

42 LBL_String_displayname_tolowercase_inputparam1=string to convert

72 #Operator lefttrim

73 LBL_String_lefttrim = LeftTrim

74 LBL_String_displayname_lefttrim_inputparam1=string to trim

81 LBL_String_righttrim = RightTrim

82 LBL_String_displayname_righttrim_inputparam1=string to trim

83 LBL_String_displayname_righttrim_outputparam1=result (varchar)

84 TOOLTIP_String_righttrim = Trim String (Remove White Space) from Right

85 TOOLTIP_String_righttrim_inputParm1 = Input String

112 #Operator TRIM

113 LBL_String_trim = Trim

114 LBL_String_displayname_trim_inputparam1=input

StyleSettings.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 375 lines ✨ Summary

This Java code provides a set of utility methods for managing syntax highlighting in the jEdit text editor. It allows loading and saving style sets, tokens, and fold levels, as well as retrieving default styles and style set names. The methods are designed to work with the jEdit API, providing a way to customize the editor’s appearance and behavior.

278 getStyleSetListPropertyName(mode));

279

280 if (styleSetList == null || styleSetList.trim().equals(""))

281 {

282 return new String[] {};

322 }

323

324 String tokenName = Token.tokenToString(tokenType).toLowerCase(Locale.ENGLISH);

325 String modeName = (mode == null) ? "all" : mode;

326

registry.js (https://gitlab.com/then-try-this/penelopean-robotics) JavaScript · 265 lines

105 */

106 Blockly.registry.register = function(type, name, registryItem, opt_quiet) {

107 if ((!(type instanceof Blockly.registry.Type) && typeof type != 'string') || String(type).trim() == '') {

108 throw Error('Invalid type "' + type + '". The type must be a' +

109 ' non-empty string or a Blockly.registry.Type.');

110 }

111 type = String(type).toLowerCase();

112

113 if ((typeof name != 'string') || (name.trim() == '')) {

115 ' non-empty string.');

116 }

117 name = name.toLowerCase();

118 if (!registryItem) {

119 throw Error('Can not register a null value');

colors.js (https://gitlab.com/Etern4l/BitcoinDice) JavaScript · 653 lines

167 rgba = inst._rgba = [];

168

169 string = string.toLowerCase();

170

171 each( stringParsers, function( i, parser ) {

String.cpp (https://github.com/deas/alfresco.git) C++ · 885 lines

231 * @return String

232 */

233 String String::toLowerCase() const {

234

235 // Create a copy of the string then convert to lowercase

471

472 /**

473 * Trim leading and trailing whitespace from the string returning the resulting String

474 *

475 * @return String

476 */

477 String String::trim( void) const {

478 std::wstring str = m_string;

479 str.erase( str.find_last_not_of( L" ") + 1);

matchers.js (https://gitlab.com/warmsys-public/warmsys-jasmine-matchers) JavaScript · 434 lines

5 if(element = $element.get(0))

6 {

7 text = element.nodeName.toLowerCase();

8 if(element.id)

9 {

271 {

272 var element = parentElement.get(0);

273 text = element.nodeName.toLowerCase();

274 if(element.id)

275 {

StaticStringy.php (https://gitlab.com/kimting254/wbms) PHP · 979 lines

42

43 /**

44 * Returns a camelCase version of the string. Trims surrounding spaces,

45 * capitalizes letters following digits, spaces, dashes and underscores,

46 * and removes spaces, dashes, as well as underscores.

56

57 /**

58 * Returns an UpperCamelCase version of the supplied string. It trims

59 * surrounding spaces, capitalizes letters following digits, spaces, dashes

60 * and underscores, and removes spaces, dashes, underscores.

70

71 /**

72 * Returns a lowercase and trimmed string separated by dashes. Dashes are

73 * inserted before uppercase characters (with the exception of the first

74 * character of the string), and in place of spaces as well as underscores.

StaticStringyTest.php (https://gitlab.com/4gdevs/online-class-record-system) PHP · 710 lines

254

255 /**

256 * @dataProvider toLowerCaseProvider()

257 */

258 public function testToLowerCase($expected, $str, $encoding = null)

259 {

260 $result = S::toLowerCase($str, $encoding);

261 $this->assertInternalType('string', $result);

262 $this->assertEquals($expected, $result);

401

402 /**

403 * @dataProvider trimProvider()

404 */

405 public function testTrim($expected, $str, $chars = null, $encoding = null)

QuickAccessSourcePath.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 251 lines ✨ Summary

This Java class, QuickAccessSourcePath, is a wrapper around a SourcePath that provides quicker access to its elements. It creates an index map of source files by their first letter and substring, allowing for faster lookup of files starting with a specific character or containing a certain substring. The class also includes methods to get all files in the project and filter them based on exclude regular expressions.

120 public List getSourceFilesStartingWith(char ch)

121 {

122 List sourceFileList = mQuickAccessMap.get(String.valueOf(ch).toLowerCase());

123

124 if(sourceFileList == null) {

138 }

139

140 List sourceFileList = mQuickAccessMap.get(string.toLowerCase());

141

142 if(sourceFileList == null) {

190 {

191 // get first letter

192 String firstLetter = sourcePathFile.getFullName().toLowerCase().substring(0,1);

193 List<SourcePathFile> currentLetterList = mQuickAccessMap.get(firstLetter);

194 if (currentLetterList == null) {

QuickAccessSourcePath.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 222 lines ✨ Summary

This Java class, QuickAccessSourcePath, is a wrapper around a SourcePath that provides quicker access to its elements by storing them in data structures for fast lookup. It maps characters and substrings to lists of source path files, allowing users to quickly retrieve files starting with or containing specific letters or strings.

116 public List getSourceFilesStartingWith(char ch)

117 {

118 List sourceFileList = (List) mQuickAccessMap.get(String.valueOf(ch).toLowerCase());

119

120 if(sourceFileList == null) {

134 }

135

136 List sourceFileList = (List) mQuickAccessMap.get(string.toLowerCase());

137

138 if(sourceFileList == null) {

179 if (regularExpression == null || !regularExpression.isMatch(sourcePathFile.getFullName())) {

180 // get first letter

181 String firstLetter = sourcePathFile.getFullName().toLowerCase().substring(0,1);

182 List currentLetterList = (List) mQuickAccessMap.get(firstLetter);

183 if (currentLetterList == null) {

FindFileWindow.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 663 lines ✨ Summary

This Java code is part of a file finder application that integrates with the JEdit text editor. It creates a window to search for files based on a given text, and updates the list of matching files as the user types. The code uses Swing components and event handling to create an interactive interface. When a file is selected, it notifies listeners and closes the window.

548 // document text (to compare with) lowercase

549 if (!jEdit.getBooleanProperty(OpenItProperties.POP_UP_CASE_SENSITIVE_FILE_MATCHING, false)) {

550 currentFileName = currentFileName.toLowerCase();

551 documentText = documentText.toLowerCase();

browser.js (https://gitlab.com/marvin1/soundcloud) JavaScript · 771 lines

91 getResponseHeader: function (header) {

92

93 return res.headers[header.toLowerCase()];

94 }

95 };

135 getResponseHeader: function (header) {

136

137 return res.headers[header.toLowerCase()];

138 }

139 };

179 getResponseHeader: function (header) {

180

181 return res.headers[header.toLowerCase()];

182 }

183 };

SuggestionFieldBean.java (https://github.com/grb123/OpenFaces.git) Java · 193 lines

92 for (Object myPlant : plants) {

93 String plant = (String) myPlant;

94 String plantForComparison = plant.toLowerCase();

95 String typedValueForComparison = typedValue.toLowerCase();

autocomplete.controllers.js (https://github.com/MapStory/mapstory.git) JavaScript · 215 lines

162

163 function createFilter(query) {

164 const lowercaseQuery = query.toLowerCase();

165 return function filterFn(entry) {

166 return _.some(entry._lower, i => i.indexOf(lowercaseQuery) > -1);

EncodedPolyline.js (https://github.com/pgiraud/openlayers.git) JavaScript · 557 lines

141

142 var geometry = feature.geometry;

143 var type = geometry.CLASS_NAME.split('.')[2].toLowerCase();

144

145 var pointGeometries;

AbbrevsOptionPane.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 508 lines ✨ Summary

This Java code is a GUI application for managing abbreviations and expansions. It allows users to add, remove, and sort abbreviations based on their text content. The data is stored in a Hashtable and displayed in a table with two columns: abbreviation and expansion. The application uses a custom comparator to sort the data alphabetically.

330 // workaround for Swing's annoying processing of

331 // labels starting with <html>, which often breaks

332 if(valueStr.toLowerCase().startsWith("<html>"))

333 valueStr = ' ' + valueStr;

334 return super.getTableCellRendererComponent(table,valueStr,

471 if(col == 0)

472 {

473 String abbrev1 = a1.abbrev.toLowerCase();

474 String abbrev2 = a2.abbrev.toLowerCase();

479 else

480 {

481 String expand1 = a1.expand.toLowerCase();

482 String expand2 = a2.expand.toLowerCase();

SessionFileConverter.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 133 lines ✨ Summary

This Java program converts old session files to XML format. It scans a directory for .session files, reads each file line by line, and parses the information into an XML structure. The converted XML is then saved to a new file, replacing the original. This process maintains compatibility with older versions of jEdit sessions.

63 public boolean accept(File dir, String name)

64 {

65 return name.toLowerCase().endsWith(".session");

66 }

67 });

API.java (https://github.com/Minecraftserver-si/AuthDB.git) Java · 845 lines

53 }

54 } else {

55 UserID = MySQL.getfromtable(Config.script_tableprefix + "users", "`user_id`", "username_clean", player.getName().toLowerCase());

56 IsBanned = MySQL.getfromtable(Config.script_tableprefix + "banlist", "`ban_id`", "ban_userid", UserID);

57 if (IsBanned.equalsIgnoreCase("fail")) {

70 }

71 } else {

72 UserID = MySQL.getfromtable(Config.script_tableprefix + "users", "`users_id`", "username_clean",player.getName().toLowerCase());

73 BanReason = MySQL.getfromtable(Config.script_tableprefix + "banlist", "`ban_reason`", "ban_userid", UserID);

74 if (BanReason != "fail" && BanReason != "" && BanReason != null) {

91 }

92 } else {

93 UserID = MySQL.getfromtable(Config.script_tableprefix + "users", "`user_id`", "username_clean", player.getName().toLowerCase());

94 BannedToDate = MySQL.getfromtable(Config.script_tableprefix + "banlist", "`ban_end`", "ban_userid", UserID);

95 if (BannedToDate != "fail") {

ArrayUtils.cls (https://gitlab.com/Aaeinstein54/linguist) Visual Basic for Applications · 458 lines

70 if(strs.size() > 0){

71 for(String str : strs){

72 returnValue.add(str == null ? null : str.toLowerCase());

73 }

74 }

90 }

91

92 global static List<String> trim(List<String> strs){

93 List<String> returnValue = null;

94 if(strs != null){

149

150 global static Object[] pluck(SObject[] objectArray, String fieldName){

151 if(isEmpty(objectArray) || fieldName == null || fieldName.trim() == null || fieldName.trim().length() == 0){

152 return new Object[]{};

153 }

cutter.developer.js (https://gitlab.com/Mirros/jsdelivr) JavaScript · 546 lines

218 };

219 /**

220 * trim is an utilities method used to keep out all the spaces before or after the sentence

221 * @member Cutter.prototype

222 * @author Tomas Corral Casas

223 * @param {string} sString This is the text to be trimmed

224 * @private

225 * @return the trimmed string

226 * @type String

227 */

228 Cutter.prototype.trim = function (sString) {

229 return sString.replace(/^\s+/g, '').replace(/\s+$/g, '');

230 };

GetterUtil.java (https://github.com/danielreuther/liferay-portal.git) Java · 1110 lines

175

176 try {

177 return new BigDecimal(valueString.trim());

178 }

179 catch (NumberFormatException numberFormatException) {

244 }

245

246 value = StringUtil.toLowerCase(value);

247 value = value.trim();

265

266 try {

267 Date date = dateFormat.parse(value.trim());

268

269 if (date != null) {

280 if (value != null) {

281 try {

282 return Double.parseDouble(value.trim());

283 }

284 catch (Exception exception) {

FragmentEntryLocalServiceTest.java (https://github.com/danielreuther/liferay-portal.git) Java · 1138 lines

113

114 Assert.assertEquals(

115 StringUtil.toLowerCase(fragmentEntryKey),

116 persistedFragmentEntry.getFragmentEntryKey());

117 Assert.assertEquals(name, persistedFragmentEntry.getName());

154

155 Assert.assertEquals(

156 StringUtil.toLowerCase(fragmentEntryKey),

157 persistedFragmentEntry.getFragmentEntryKey());

158 Assert.assertEquals(name, persistedFragmentEntry.getName());

192

193 Assert.assertEquals(

194 StringUtil.toLowerCase(fragmentEntryKey),

195 persistedFragmentEntry.getFragmentEntryKey());

196 Assert.assertEquals(name, persistedFragmentEntry.getName());

tip34.html (https://jedit.svn.sourceforge.net/svnroot/jedit) HTML · 23 lines ✨ Summary

This HTML code explains how to use BeanShell scripting in a search dialog box for replacing strings or regular expressions in an HTML file. It provides an example of converting HTML tags to lower case by searching for <code>...</code> and replacing with "&lt;" + _1.toLowerCase() + "&gt;".

18

19 <p>

20 <code>"&lt;" + _1.toLowerCase() + "&gt;"</code>

21

22 </body></html>

KeyEventTranslator.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 365 lines ✨ Summary

This Java code is a key event translator for handling keyboard events on different operating systems. It maps Java modifier flags to symbolic names and translates them into strings that can be used in event handling. The code also includes a Key class to represent individual key events with modifiers, keys, and input characters.

78 returnValue = new Key(

79 getModifierString(evt),

80 '\0',Character.toLowerCase(

81 (char)keyCode));

82 }

colors.js (http://enginey.googlecode.com/svn/trunk/) JavaScript · 233 lines ✨ Summary

This JavaScript code defines a set of color constants and assigns them to an object called Color. It creates a comprehensive list of colors, including their RGB values, which can be used in web development for styling and design purposes. The colors are organized alphabetically and can be accessed using the dot notation, e.g., Color.lavender would return the color with the value [230, 230, 250].

36 // this function can handle all 4 CSS3 Color Module formats: rgb,

37 // rgba, hsl, hsla, including rgb(a) with percentage values.

38 var m = color.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);

39 if(m){

40 var c = m[2].split(/\s*,\s*/), l = c.length, t = m[1];

Answer.java (https://bitbucket.org/Schimodie/aiprojectqa.git) Java · 533 lines

79

80 data +=

81 MainKnowledge.searchWiki(chr, null).trim() + "\n";

82 }

83

86 }

87

88 return data.trim();

89 }

90 else if (q.containsFocusType(FocusType.OCCUPATION)) {

120

121 data +=

122 MainKnowledge.searchWiki(chr, null).trim() + "\n";

123 }

124

BshClassPath.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 888 lines ✨ Summary

This Java code defines a class BshClassPath that represents a classpath for a Java application. It provides methods to add URLs, map classes, and provide feedback on the mapping process through listeners. The class also handles loading of class files from disk and provides an interface for external feedback mechanisms.

509

510 public static boolean isClassFileName( String name ){

511 return ( name.toLowerCase().endsWith(".class") );

512 //&& (name.indexOf('$')==-1) );

513 }

514

515 public static boolean isArchiveFileName( String name ){

516 name = name.toLowerCase();

517 return ( name.endsWith(".jar") || name.endsWith(".zip") );

518 }

GUIUtilities.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 1838 lines ✨ Summary

This Java code provides utility methods for a text editor, specifically for GUI-related tasks. It includes functionality for displaying a splash screen, advancing its progress, and saving the size of frames and windows. The SizeSaver class is used to continually save a frame’s size when it is resized or moved.

377 if(index != -1 && label.length() - index > 1)

378 {

379 mnemonic = Character.toLowerCase(label.charAt(index + 1));

380 label = label.substring(0,index).concat(label.substring(++index));

381 }

411 if(index != -1 && label.length() - index > 1)

412 {

413 mnemonic = Character.toLowerCase(label.charAt(index + 1));

414 label = label.substring(0,index).concat(label.substring(++index));

415 }

WebConfigParamUtils.java (https://gitlab.com/essere.lab.public/qualitas.class-corpus) Java · 709 lines

82 }

83

84 param = param.trim();

85 if (param.length() == 0)

86 {

157 }

158

159 param = param.trim();

160 if (param.length() == 0)

161 {

221 else

222 {

223 return Boolean.parseBoolean(param.toLowerCase());

224 }

225 }

PerspectivationPositionTest.java (https://gitlab.com/monochromata-de/de.monochromata.eclipse.anaphors) Java · 859 lines

230 position.notify(new DocumentEvent(), document);

231

232 assertThat(position.getToLowerCasePositions()).containsExactly(new ToLowerCasePosition(10));

233 }

234

409

410 @Test

411 public void documentRetainsToLowerCaseOfUnaffectedPositionOnDeletion() throws Exception {

412 document.set("The Quick Brown Fox Is Slow Today.");

413 final PerspectivationPosition position = new PerspectivationPosition(19, 5, event -> true,

414 asList(new Perspectivation.ToLowerCase(0)));

415 originDocument.addPosition(PERSPECTIVATION_CATEGORY, position);

416 position.notify(new DocumentEvent(document, 0, 0, ""), document);

Domain.java (https://github.com/revolsys/com.revolsys.open.git) Java · 358 lines

64 this.idValueMap.put(identifier, values);

65 this.stringIdMap.put(code.toString(), identifier);

66 this.valueIdMap.put(name.toLowerCase(), identifier);

67 if (code instanceof Number) {

68 final int id = ((Number)code).intValue();

155 return this.stringIdMap.get(value.toString());

156 } else {

157 final String lowerValue = ((String)value).toLowerCase();

158 final Identifier id = this.valueIdMap.get(lowerValue);

159 return id;

tip34.html (https://jedit.svn.sourceforge.net/svnroot/jedit) HTML · 20 lines ✨ Summary

This HTML code displays a snippet explaining how to use BeanShell to convert HTML tags to lower case. It shows an example regular expression for matching HTML tags and a corresponding BeanShell script that converts the matched text to lower case, replacing it in the original string. The goal is to demonstrate a way to automate this task using BeanShell.

14

15 <p>

16 <code>"&lt;" + _1.toLowerCase() + "&gt;"</code>

17 </p>

18

StandardUtilities.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 492 lines ✨ Summary

This Java code provides a set of utility methods for string manipulation, comparison, and regular expression conversion. It includes functions for comparing strings, checking object equality, converting Unix-style glob patterns to regular expressions, and more. The code is part of a larger class called StandardUtilities and appears to be designed for use in an integrated development environment (IDE) or text editor.

350 if(ignoreCase)

351 {

352 ch1 = Character.toLowerCase(ch1);

353 ch2 = Character.toLowerCase(ch2);

SettingsReloader.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 96 lines ✨ Summary

This Java class, SettingsReloader, is a utility component that reloads macros and modes when necessary. It listens for VFSUpdate messages from the JEdit editor and checks if the updated path starts with specific directories (e.g., macros or modes). If it does, it reloads the corresponding settings.

56 & VFS.CASE_INSENSITIVE_CAP) != 0)

57 {

58 path = path.toLowerCase();

59 jEditHome = jEditHome.toLowerCase();

60 if(settingsDirectory != null)

61 settingsDirectory = settingsDirectory.toLowerCase();

62 }

63

GetterUtil.java (https://github.com/kiyoshilee/liferay-portal.git) Java · 1110 lines

175

176 try {

177 return new BigDecimal(valueString.trim());

178 }

179 catch (NumberFormatException nfe) {

244 }

245

246 value = StringUtil.toLowerCase(value);

247 value = value.trim();

265

266 try {

267 Date date = dateFormat.parse(value.trim());

268

269 if (date != null) {

280 if (value != null) {

281 try {

282 return Double.parseDouble(value.trim());

283 }

284 catch (Exception e) {

AbstractDelegatingCache.java (https://github.com/wburns/infinispan.git) Java · 641 lines

94 )

95 public String getCacheName() {

96 return getName() + "(" + getCacheConfiguration().clustering().cacheMode().toString().toLowerCase() + ")";

97 }

98

jquery.quiz.js (https://bitbucket.org/reinholdsson/slidifyexamples.git) JavaScript · 565 lines

384

385 if ( !self.caseSensitive ) {

386 userAnswer = userAnswer.toLowerCase();

387 if ( self.answer )

388 self.answer = self.answer.toLowerCase();

389 }

390

391 if ( !self.notrim ) {

392 userAnswer = $.trim(userAnswer);

393 self.answer = $.trim(self.answer);

394 if ( self.answer )

395 self.answer = self.answer.toLowerCase();

484

485 self.caseSensitive = self.question.attr('data-sensitive') != undefined;

486 self.notrim = self.question.attr('data-notrim') != undefined;

487

488 $('.quiz-clear', self.question).each(function() {

VoxSpellPainter.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 325 lines ✨ Summary

This Java code is part of a spell-checking system for an integrated development environment (IDE). It checks words in a line of text against a dictionary to determine if they are valid or not. The code uses a combination of tokenization and string matching to identify invalid words, and it can be used to highlight or underline these words in the IDE’s editor.

184 boolean user_only)

185 {

186 String trim_word = word.trim();

187 String low_word = trim_word.toLowerCase();

188

189 if (trim_word.length() == 0)

190 return true;

191 if (low_word.length() == 1)

192 return true;

193 if (trim_word.endsWith("'") && trim_word.length() == 2)

194 return true;

195 Character c = trim_word.charAt(0);

224 if (user_only) {

225 return user_checker.find(low_word) ||

226 user_checker.find(trim_word) ||

227 ignore_checker.find(low_word) ||

228 ignore_checker.find(trim_word);

properties.js (https://gitlab.com/nguyenthehiep3232/marius) JavaScript · 1687 lines

160

161 var backgroundRepeat_local_var_parse = function parse(v) {

162 if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'repeat' || v.toLowerCase() === 'repeat-x' || v.toLowerCase() === 'repeat-y' || v.toLowerCase() === 'no-repeat' || v.toLowerCase() === 'inherit')) {

163 return v;

164 }

184

185 var backgroundAttachment_local_var_isValid = backgroundAttachment_export_isValid = function isValid(v) {

186 return external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'scroll' || v.toLowerCase() === 'fixed' || v.toLowerCase() === 'inherit');

187 };

188

506

507 var borderCollapse_local_var_parse = function parse(v) {

508 if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'collapse' || v.toLowerCase() === 'separate' || v.toLowerCase() === 'inherit')) {

509 return v;

510 }

Furniture.java (https://github.com/GitLance/cappo-Java.git) Java · 427 lines

85 if(Item.Type.equals("s"))

86 {

87 String ItemName = Item.ItemName.toLowerCase();

88

89 if(Item.PublicName.startsWith("WIRED Trigger:"))

276 }

277 }

278 else if(Item.PublicName.toLowerCase().contains("chair"))

279 {

280 Item.IsSeat = true;

284 Item.IsSeat = true;

285 }

286 else if(Item.PublicName.toLowerCase().contains("bed"))

287 {

288 Item.Interaction = BED;

RequestManager.java (https://github.com/masp/SimpleClans.git) Java · 515 lines

49 String msg = MessageFormat.format(plugin.getLang().getString("asking.for.the.demotion"), Helper.capitalize(requester.getName()), demotedName);

50

51 ClanPlayer demotedTp = plugin.getClanManager().getClanPlayer(demotedName.toLowerCase());

52

53 List<ClanPlayer> acceptors = Helper.stripOffLinePlayers(clan.getLeaders());

107 String msg = MessageFormat.format(plugin.getLang().getString("inviting.you.to.join"), Helper.capitalize(requester.getName()), clan.getName());

108 Request req = new Request(plugin, ClanRequest.INVITE, null, requester, invitedName, clan, msg);

109 requests.put(invitedName.toLowerCase(), req);

110 ask(req);

111 }

262 }

263

264 requests.remove(req.getTarget().toLowerCase());

265 }

266

EnhancedMenu.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 68 lines ✨ Summary

This Java class, EnhancedMenu, extends JMenu to create a custom menu for jEdit. It loads menu items from properties files and adds them to the menu based on their names. The menu’s label and mnemonic are also set according to the properties file. It uses GUIUtilities to load menu items and separators.

36 if(index != -1 && label.length() - index > 1)

37 {

38 mnemonic = Character.toLowerCase(label.charAt(index + 1));

39 label = label.substring(0,index).concat(label.substring(++index));

40 }

HelpSearchPanel.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 301 lines ✨ Summary

This Java code implements a search functionality for a help viewer GUI. It allows users to search for specific keywords within the help documentation, displaying relevant results in a list with ranking scores. The search is case-insensitive and ignores punctuation. When a result is selected, it opens the corresponding URL in the help viewer.

217 while(st.hasMoreTokens())

218 {

219 String word = st.nextToken().toLowerCase();

220 HelpIndex.Word lookup = index.lookupWord(word);

221 if(lookup == null)

CodeGenerationASTTransformsTest.groovy (https://github.com/lhotari/groovy-core.git) Groovy · 1051 lines

452 String occupation

453 Base() {}

454 Base(String job) { occupation = job?.toLowerCase() }

455 }

456

ActionBar.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 555 lines ✨ Summary

This Java code implements a custom text editor’s action bar, which provides a dropdown list of possible actions (e.g., “Open File”, “Save File”). The action bar is triggered by pressing the Tab key while editing. When an action is selected, it invokes a corresponding method on the action object. The action bar also handles keyboard shortcuts for common operations like escaping and entering new text.

109 else

110 {

111 cmd = action.getText().trim();

112 int index = cmd.indexOf('=');

113 if(index != -1)

114 {

115 action.addCurrentToHistory();

116 String propName = cmd.substring(0,index).trim();

117 String propValue = cmd.substring(index + 1).trim();

214 private String[] getCompletions(String str)

215 {

216 str = str.toLowerCase();

217 String[] actions = jEdit.getActionNames();

218 ArrayList returnValue = new ArrayList(actions.length);

219 for(int i = 0; i < actions.length; i++)

220 {

221 if(actions[i].toLowerCase().indexOf(str) != -1)

222 returnValue.add(actions[i]);

223 }

jquery.validate-vsdoc.js (https://hg01.codeplex.com/fsharpmvc3vsix) JavaScript · 1300 lines ✨ Summary

This JavaScript code provides a set of utility functions and plugins for jQuery, including:

  • A validator plugin for form validation
  • An AJAX abort function to cancel previous requests
  • Cross-browser focusin and focusout event handling
  • Event delegation functionality using the validateDelegate method.

It appears to be a collection of miscellaneous utilities for working with forms and AJAX requests in jQuery.

212 $.extend($.expr[":"], {

213 // http://docs.jquery.com/Plugins/Validation/blank

214 blank: function(a) {return !$.trim("" + a.value);},

215 // http://docs.jquery.com/Plugins/Validation/filled

216 filled: function(a) {return !!$.trim("" + a.value);},

785

786 getLength: function(value, element) {

787 switch( element.nodeName.toLowerCase() ) {

788 case 'select':

789 return $("option:selected", element).length;

814

815 optional: function(element) {

816 return !$.validator.methods.required.call(this, $.trim(element.value), element) && "dependency-mismatch";

817 },

818

jquery-ui-1.8.11.js (https://hg01.codeplex.com/fsharpmvc3vsix) JavaScript · 11701 lines ✨ Summary

This JavaScript code defines four jQuery UI effects: slide, transfer, shake, and slide. It creates animations for elements to slide, transfer position, shake, or slide with a last shake effect. The effects are triggered by calling the corresponding function on a jQuery object, passing an options object that configures the animation’s duration, easing, and other properties.

137 $.each( [ "Width", "Height" ], function( i, name ) {

138 var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],

139 type = name.toLowerCase(),

140 orig = {

141 innerWidth: $.fn.innerWidth,

193

194 focusable: function( element ) {

195 var nodeName = element.nodeName.toLowerCase(),

196 tabIndex = $.attr( element, "tabindex" );

197 if ( "area" === nodeName ) {

199 mapName = map.name,

200 img;

201 if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {

202 return false;

203 }

effects.js (git://github.com/kingarawana/testapp.git) JavaScript · 1123 lines ✨ Summary

This JavaScript code defines a set of visual effects and utility functions for manipulating HTML elements, such as fading, animating, highlighting, and modifying element styles. It also provides methods for getting inline styles, forcing re-rendering, and collecting text nodes from an element. The effects are designed to be reusable and can be chained together to create complex animations.

19 } else {

20 if (this.slice(0,1) == '#') {

21 if (this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase();

22 if (this.length==7) color = this.toLowerCase();

150 toggle: function(element, effect, options) {

151 element = $(element);

152 effect = (effect || 'appear').toLowerCase();

153

154 return Effect[ Effect.PAIRS[ effect ][ element.visible() ? 1 : 0 ] ](element, Object.extend({

FileHandler.java (http://keywatch.googlecode.com/svn/trunk/) Java · 428 lines ✨ Summary

This Java code is part of a file handler that processes XML events from an XML-RPC server. It parses the event XML, extracts relevant information such as severity, description, and source task, and creates an Event object to represent the parsed data. The code uses various libraries like DOM and XML-RPC to handle the parsing and extraction of data.

101

102 // If it's a zip file, extract files and remove it

103 if (fullname.toLowerCase().endsWith(Constants.PROVIDER_EXT_ZIP))

104 {

105 boolean allOK = processZipFiles(fullname);

TypedProperties.java (https://github.com/interdroid/smartsockets.git) Java · 506 lines

464 String value = getProperty(key);

465

466 if (key.toLowerCase().startsWith(prefix.toLowerCase())) {

467 out.println(key + " = " + value);

468 }

MessageHeader.java (https://gitlab.com/UnderSampled/aard2-build) Java · 477 lines

99

100 if(value == null) {

101 String token = name.toLowerCase();

102

103 values.remove(token);

352 * will present that values as tokens extracted from the header.

353 * This has obvious performance benefits as it avoids having to

354 * deal with <code>substring</code> and <code>trim</code> calls.

355 * <p>

356 * The tokens returned by this method are ordered according to

360 * there are no "q" values present then order is by appearance.

361 * <p>

362 * The result from this is either the trimmed header value, that

363 * is, the header value with no leading or trailing whitespace

364 * or an array of trimmed tokens ordered with the most preferred

SystemShell.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 1069 lines ✨ Summary

This Java code is part of a console shell implementation, likely for an integrated development environment (IDE). It provides functionality for navigating directories, executing commands, and handling user input. The code includes methods for changing the current directory, listing available commands, and parsing command-line arguments with escaped delimiters. It also tracks the last executed directory change and error messages.

886 ArrayList matchingFilenames = new ArrayList(filenames.length);

887 int matchingFilenamesCount = 0;

888 String matchedString = isOSCaseSensitive ? fileName : fileName.toLowerCase();

889 for(int i = 0; i < filenames.length; i++)

890 {

891 String matchedAgainst = isOSCaseSensitive ? filenames[i] : filenames[i].toLowerCase();

892

893 if(matchedAgainst.startsWith(matchedString))

Locator.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 597 lines ✨ Summary

This Java code provides utility methods for working with Java classes, files, and URLs. It can load Sun compiler tools, find jar files in a location, scan directories for matching files, and more. The code is designed to be used by the Eclipse IDE’s Java Development Tools (JDT) project.

287 File f = new File( path );

288 // check for jar or zip

289 if ( path.toLowerCase().endsWith( ".jar" ) || path.toLowerCase().endsWith( ".zip" ) ) {

290 List names = getJarClassNames( f );

291 if ( names != null ) {

294 }

295 // check for individual class

296 else if ( path.toLowerCase().endsWith( ".class" ) ) {

297 allnames.add( f.getName().substring( 0, f.getName().lastIndexOf( "." ) ) );

298 }

509 // based on java.home setting

510 String javaHome = System.getProperty( "java.home" );

511 if ( javaHome.toLowerCase( Locale.US ).endsWith( "jre" ) ) {

512 javaHome = javaHome.substring( 0, javaHome.length() - 4 );

513 }

FieldDeclaration.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 249 lines ✨ Summary

This Java class represents a Field Declaration in PHP, which is a variable declaration for a php class. It extends Statement and implements various interfaces to provide information about the field, such as its name, path, and variables. It also provides methods to analyze code and get the field’s expression at a specific line and column.

174 if (nameLowerCase == null)

175 {

176 nameLowerCase = variable.getName().toLowerCase();

177 }

178 return nameLowerCase;

SettingsReloader.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 81 lines ✨ Summary

This Java class, SettingsReloader, is a utility that reloads macros and modes when necessary. It listens for VFSUpdate messages to check if files have changed in the settings directory or JEdit home directory. If a file has changed, it updates the corresponding macro or mode settings accordingly.

51 if(OperatingSystem.isDOSDerived() || OperatingSystem.isMacOS())

52 {

53 path = path.toLowerCase();

54 if(jEditHome != null)

55 jEditHome = jEditHome.toLowerCase();

56 if(settingsDirectory != null)

57 settingsDirectory = settingsDirectory.toLowerCase();

58 }

59

TextUtilities.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 714 lines ✨ Summary

This Java code provides various string manipulation and formatting functions, including:

  • String case detection (mixed, lower case, upper case, title case)
  • String conversion to title case
  • Line wrapping and formatting for text with a specified maximum line length
  • Leading whitespace trimming and calculation
  • Tokenization of strings into words

These functions can be used in various applications, such as text editing or formatting.

665 {

666 return Character.toUpperCase(str.charAt(0))

667 + str.substring(1).toLowerCase();

668 }

669 } //}}}

SearchAndReplace.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 909 lines ✨ Summary

This Java code implements a search and replace functionality for a text editor. It allows users to set various options, such as case sensitivity and regular expression usage, and then performs a global search and replacement of specified strings within a buffer. The code also records the actions taken during the process for debugging purposes.

875 int strCase = TextUtilities.getStringCase(found);

876 if(strCase == TextUtilities.LOWER_CASE)

877 subst = subst.toLowerCase();

878 else if(strCase == TextUtilities.UPPER_CASE)

879 subst = subst.toUpperCase();

FilteredTreeModel.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 498 lines ✨ Summary

This Java code implements a custom tree model that filters nodes based on visibility. It provides methods to set and reset the visible nodes, as well as add and remove listeners for events related to node changes. The TreeNodeParentProvider class is used to retrieve parent nodes in a tree structure. It allows for customization of how parents are retrieved from nodes.

268 if (ignoreCase)

269 {

270 text = text.toLowerCase();

271 }

272 }

LFont.java (http://loon-simple.googlecode.com/svn/trunk/) Java · 308 lines ✨ Summary

This Java code defines a class LFont that represents a font used for rendering text on an Android screen. It provides methods to create and manipulate fonts, including getting font metrics, measuring text width, and setting font styles. The class is designed to work with the Android system’s font management system.

88

89 public static LFont getFont(String familyName, int style, int size) {

90 String name = (familyName + style + size).toLowerCase();

91 Object o = fonts.get(name);

92 if (o == null) {

AStyle.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 694 lines ✨ Summary

This is a help message for an AStyle command-line tool, explaining its options and usage. It provides detailed information on various formatting and configuration options, including file naming conventions, error handling, and version control. The output explains how to use the tool, what options are available, and where default settings can be found.

482 }

483 } while (!eof);

484 String currentToken = currentTokenBuf.toString().trim();

485 if (currentToken.length() != 0) {

486 optionsVector.addElement(currentToken);

503

504 private boolean stringEndsWith(String str, String suffix) {

505 return str.toLowerCase().endsWith(suffix.toLowerCase());

506 }

507

ShortcutsOptionPane.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 358 lines ✨ Summary

This Java code is a part of an application that manages shortcuts for various applications. It creates a table model to display and edit shortcuts, with columns for shortcut name, first shortcut, and second shortcut. The model allows users to add, edit, and delete shortcuts, and saves the changes to the system’s properties.

322 = (GrabKeyDialog.KeyBinding[])obj2;

323

324 String label1 = k1[0].label.toLowerCase();

325 String label2 = k2[0].label.toLowerCase();

BinaryDictionary.java (http://softkeyboard.googlecode.com/svn/) Java · 163 lines ✨ Summary

This Java class, BinaryDictionary, implements a static binary dictionary of standard words for an Android application. It loads and compiles a raw resource file into a native library, allowing for efficient word suggestions and validation. The class provides methods to load the dictionary, get words from input codes, validate words, and close the dictionary.

144 public boolean isValidWord(CharSequence word) {

145 if (word == null) return false;

146 char[] chars = word.toString().toLowerCase().toCharArray();

147 return isValidWordNative(mNativeDict, chars, chars.length);

148 }

HtmlScrubber.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 148 lines ✨ Summary

This Java class, HtmlScrubber, is a Visitor that cleans up an HTML document tree by applying various transformations to its elements and attributes. It can convert tag names and attribute values to uppercase or lowercase, strip unnecessary quotes, and trim spaces from text nodes. The scrubbing options are customizable through a bitmask.

34 public static final int ATTR_DOWNCASE = 8;

35 public static final int STRIP_QUOTES = 16;

36 public static final int TRIM_SPACES = 32;

37 public static final int DEFAULT_OPTIONS =

38 TAGS_DOWNCASE | ATTR_DOWNCASE | STRIP_QUOTES;

83 t.tagName = t.tagName.toUpperCase();

84 else if ((flags & TAGS_DOWNCASE) != 0)

85 t.tagName = t.tagName.toLowerCase();

86 for (Iterator it=t.attributeList.attributes.iterator(); it.hasNext(); ) {

87 HtmlDocument.Attribute a = (HtmlDocument.Attribute) it.next();

89 a.name = a.name.toUpperCase();

90 else if ((flags & ATTR_DOWNCASE) != 0)

91 a.name = a.name.toLowerCase();

92 if (((flags & STRIP_QUOTES) != 0)

93 && a.hasValue

JavadocPlugin.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 172 lines ✨ Summary

This Java code is a plugin for the JEdit text editor, specifically designed to manage and search Java API documentation. It allows users to add and remove API roots from a list, which are used to search for class names in HTML files within those directories. The plugin also provides an action set with commands related to searching and resolving class names.

120 int start = -1, end = -1;

121 for (int i = 0; i<buffer.getLineCount(); i++) {

122 String line = buffer.getLineText(i).toLowerCase();

123 int j = line.indexOf("<title>");

124 if (start == -1 && j != -1) {

133 }

134 }

135 return buffer.getText(start, end-start).trim();

136 }

137

SyntaxHiliteOptionPane.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 418 lines ✨ Summary

This Java code creates a graphical user interface (GUI) for editing syntax highlighting styles. It allows users to select font attributes, colors, and background colors for different text elements. The GUI is presented in a dialog box with buttons for “OK” and “Cancel”. When the user clicks “OK”, the selected style is returned as a SyntaxStyle object, which can be used to apply the changes to a text editor or other application.

138 {

139 String tokenName = Token.tokenToString((byte)i);

140 addStyleChoice(tokenName,"view.style." + tokenName.toLowerCase());

141 }

142

simple.tagx (https://bitbucket.org/zzha4573/readertest.git) Unknown · 35 lines

14

15 <c:if test="${empty label}">

16 <spring:message code="label_${fn:toLowerCase(fn:substringAfter(id,'_'))}" var="label" htmlEscape="false" />

17 </c:if>

18

AbbrevsOptionPane.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 504 lines ✨ Summary

This Java code defines a GUI application for managing abbreviations and expansions. It creates a table model to store abbreviations and their corresponding expansions, allowing users to add, remove, and sort entries. The table is displayed in a GUI window with two columns: one for the abbreviation and one for the expansion.

328 // workaround for Swing's annoying processing of

329 // labels starting with <html>, which often breaks

330 if(valueStr.toLowerCase().startsWith("<html>"))

331 valueStr = ' ' + valueStr;

332 return super.getTableCellRendererComponent(table,valueStr,

470 if(col == 0)

471 {

472 String abbrev1 = a1.abbrev.toLowerCase();

473 String abbrev2 = a2.abbrev.toLowerCase();

478 else

479 {

480 String expand1 = a1.expand.toLowerCase();

481 String expand2 = a2.expand.toLowerCase();

ExpandableDictionary.java (http://scandinavian-keyboard.googlecode.com/svn/trunk/) Java · 458 lines ✨ Summary

This Java code outputs a hexadecimal representation of Unicode character codes, mapping each code to its corresponding Unicode character. The data is generated from a file called UnicodeData.txt and is used to create a lookup table for easy access to Unicode characters by their code points.

207 final Node node = roots.data[i];

208 final char c = node.code;

209 final char lowerC = toLowerCase(c);

210 final boolean terminal = node.terminal;

211 final NodeArray children = node.children;

270 }

271

272 static char toLowerCase(char c) {

273 if (c < BASE_CHARS.length) {

274 c = BASE_CHARS[c];

277 c = (char) (c | 32);

278 } else if (c > 127) {

279 c = Character.toLowerCase(c);

280 }

281 return c;

Make_Get_and_Set_Methods.bsh (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 298 lines

69 {

70 fileClassName = fileClassName.substring(0, index);

71 if(fileClassName.toLowerCase().indexOf("untitled") == -1)

72 {

73 return fileClassName;

174 if( lineText != null && !lineText.equals("") )

175 {

176 lineText = lineText.trim();

177 if( lineText.endsWith(";") )

178 {