![]()  | 
	
| 
		 
			 
			#1  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
				
				Converting a character to a number
			 
			
			
			I am currently trying to figure out how to retrieve a character from a text file and turn it to a number.  
		
		
		
		
		
		
		
		
	
	I currently split up the sentence and store the word I am interested in into an array, for example a spot in the array may look like the following: ['Interval=4;'] What I want to do is access the 4 and save its numeric value to a variable. If this is stored in array[1] for example, is there a way to access the 10th character, (the 4) and then convert it to a number? Thank you, Jassel41  | 
| 
		 
			 
			#2  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			string = 'Interval=4'  
		
		
		
		
		
		
		
		
	
	string.split('=')[1] will return 4 (as string) int(string.split('=')[1]) will return 4 (as int) string[9] will return 4 (as string) int(string[9]) will return 4 (as int) And so on. Good luck!  | 
![]()  | 
	
	
		
  | 
	
		
  | 
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Special character | adimov | Vizard | 1 | 06-15-2009 01:32 PM | 
| character pack and walkto ? | digitaldarklord | Vizard | 1 | 09-30-2008 05:42 PM | 
| Native WorldViz support for character animation | luakt | Vizard | 10 | 09-16-2008 12:39 AM | 
| Locking every bone of a character | Frank Verberne | Vizard | 2 | 03-17-2008 11:21 AM | 
| limits on number of objects | benelux | Vizard | 3 | 07-22-2004 02:26 PM |