Namespace orion.searchUtils
				
				
			
				Search utility functions.
				
				
					
Defined in:  </shared/eclipse/e4/orion/I201404012230/bundles/org.eclipse.orion.client.ui/web/orion/searchUtils.js>.
				
			
| Constructor Attributes | Constructor Name and Description | 
|---|---|
| Method Attributes | Method Name and Description | 
|---|---|
| <static> | orion.searchUtils.findRegExp(text, pattern, flags, startIndex)
								 Helper for finding regex matches in text contents. | 
| <static> | orion.searchUtils.generateSearchHelper(searchParams, fromStart)
								 Generate a helper query object used for search result renderer. | 
| <static> | orion.searchUtils.splitFile(text)
								 Split file contents into lines. | 
					Method Detail
				
				
					 
					<static> 
					
					{Object}
					orion.searchUtils.findRegExp(text, pattern, flags, startIndex)
					
					
					
						Helper for finding regex matches in text contents.
						
						
					
					
					
					
						
							- Parameters:
- {String} text
- Text to search in.
- {String} pattern
- A valid regexp pattern.
- {String} flags
- Valid regexp flags. Allowed flags are: "i","s", and any combination thereof.
- {Number} startIndex Optional
- Index to begin searching from.
- Returns:
- {Object} An object giving the match details, or
        nullif no match found. The returned object will have the properties:
 {Number} index
 {Number} length
<static> 
					
					{Object}
					orion.searchUtils.generateSearchHelper(searchParams, fromStart)
					
					
					
						Generate a helper query object used for search result renderer.
						
						
					
					
					
					
						
							- Parameters:
- {orion.searchUtils.SearchParams} searchParams
- The search parameters.
- {Boolean} fromStart
- True if doing file name search, otherwise false.
- Returns:
- {Object} An object having the properties:- orion.searchUtils.SearchParams- paramsThe search parameters.
- Object- inFileQueryThe query object for in file search.
- String- displayedSearchTermThe search term display string.
 
<static> 
					
					{String[]}
					orion.searchUtils.splitFile(text)
					
					
					
						Split file contents into lines. It also handles the mixed line endings with "\n", "\r" and "\r\n".
						
						
					
					
					
					
						
							- Parameters:
- {String} text
- The file contents.
- Returns:
- {String[]} Split file lines.