mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 13:41:03 +00:00 
			
		
		
		
	Remove String::find_last (same as rfind)
This commit is contained in:
		
							parent
							
								
									fd5b6e1db2
								
							
						
					
					
						commit
						929b98d24b
					
				
					 26 changed files with 41 additions and 80 deletions
				
			
		|  | @ -78,7 +78,7 @@ void ScriptCreateDialog::_notification(int p_what) { | |||
| 
 | ||||
| void ScriptCreateDialog::_path_hbox_sorted() { | ||||
| 	if (is_visible()) { | ||||
| 		int filename_start_pos = initial_bp.find_last("/") + 1; | ||||
| 		int filename_start_pos = initial_bp.rfind("/") + 1; | ||||
| 		int filename_end_pos = initial_bp.length(); | ||||
| 
 | ||||
| 		if (!is_built_in) { | ||||
|  | @ -553,7 +553,7 @@ void ScriptCreateDialog::_file_selected(const String &p_file) { | |||
| 		_path_changed(p); | ||||
| 
 | ||||
| 		String filename = p.get_file().get_basename(); | ||||
| 		int select_start = p.find_last(filename); | ||||
| 		int select_start = p.rfind(filename); | ||||
| 		file_path->select(select_start, select_start + filename.length()); | ||||
| 		file_path->set_cursor_position(select_start + filename.length()); | ||||
| 		file_path->grab_focus(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Stijn Hinlopen
						Stijn Hinlopen