added double jump and sitting state
This commit is contained in:
		
							parent
							
								
									2e5c5a8dde
								
							
						
					
					
						commit
						90d07dde3f
					
				
					 148 changed files with 13050 additions and 0 deletions
				
			
		
							
								
								
									
										22
									
								
								term1/seminar03_initialization/04_truncate_to_dot/main.cpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								term1/seminar03_initialization/04_truncate_to_dot/main.cpp
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,22 @@ | |||
| #include <iostream> | ||||
| #include <string> | ||||
| 
 | ||||
| using namespace std; | ||||
| 
 | ||||
| void truncateToDot(string& s) { | ||||
|     s.resize(s.find('.')); | ||||
|     s.shrink_to_fit(); | ||||
| } | ||||
| 
 | ||||
| int main() { | ||||
|     std::string a = "cat.dog.mouse.elephant.tiger.lion"; | ||||
|     std::string b = "wikipedia.org"; | ||||
|     std::string c = ".com"; | ||||
|     truncateToDot(a); | ||||
|     truncateToDot(b); | ||||
|     truncateToDot(c); | ||||
| 
 | ||||
|     cout << a << endl | ||||
|          << b << endl | ||||
|          << c << endl; | ||||
| } | ||||
		Reference in a new issue