DocSearch.PerformSearch C# (CSharp) Method

PerformSearch() static private method

static private PerformSearch ( string term ) : void
term string
return void
	void PerformSearch(string term){
		if(term != ""){
			term = term.ToLower();
			string searchPath;
			if(useLocal){
				string pathPrefix;
				if(Application.platform == RuntimePlatform.WindowsEditor){
					pathPrefix = "file:///";
				}else{
					pathPrefix = "file://";
				}
				searchPath = pathPrefix + EditorApplication.applicationContentsPath + localScriptDocURL;
				string[] pathPieces = searchPath.Split(' ');
				searchPath = String.Join("%20", pathPieces);
			}else{
				searchPath = webScriptDocURL;
			}
			Application.OpenURL(searchPath + WWW.EscapeURL(term));		
			
			if(searchedTerms.IndexOf(term) == -1){
				searchedTerms.Reverse();
				searchedTerms.Add(term);
				searchedTerms.Reverse();
			}else{
				searchedTerms.RemoveAt(searchedTerms.IndexOf(term));
				searchedTerms.Reverse();
				searchedTerms.Add(term);
				searchedTerms.Reverse();
			}
			
			CatalogSearches();
		}		
	}