mirror of
				https://github.com/Qortal/q-tube.git
				synced 2025-11-04 06:27:04 +00:00 
			
		
		
		
	Refactored constants/index.ts into Identifiers.ts, Categories.ts, and Misc.ts. Regular expressions that titles allow all use new variable in Misc.ts for consistency and ease of editing it. New Characters are allowed in titles. Categories sorted by name, "Other" is always at end of list. New Categories such as Qortal under Education have been added Title prefix TextField added that starts all video titles with the entered value.
		
			
				
	
	
		
			9 lines
		
	
	
		
			247 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			9 lines
		
	
	
		
			247 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
export const getFileExtensionIndex = (s: string) => {
 | 
						|
  const lastIndex = s.lastIndexOf(".");
 | 
						|
  return lastIndex > 0 ? lastIndex : s.length - 1;
 | 
						|
};
 | 
						|
 | 
						|
export const getFileName = (s: string) => {
 | 
						|
  return s.substring(0, getFileExtensionIndex(s));
 | 
						|
};
 |