# Class: com.pnfsoftware.jeb.client.script.ScriptUtil

Utility methods.

## Constructor: ScriptUtil


## Static Method: filenameToClassname
- parameter: `filename`, type: `java.lang.String`
- return type: `java.lang.String`

Description: Determine the main class of a script from the script filename.  Rules:
 \- the leading digits, dashes and underscores are removed from the file name to generate the class name
 \- the trailing dashes and underscores are removed from the file name to generate the class name
 

 Examples:  

```

 Sample.py -> Sample
 _Sample.py -> Sample
 1_Sample.py -> Sample
 2-Sample_.py -> Sample
 a1_Sample.py -> a1_Sample
 Sample_123.py -> Sample_123
 Sample_123__.py -> Sample_123
 111.py -> null (would be empty)
 __1-3 -> null (would be empty)
 __1.3 -> .3
 __1._ -> null (would be . which is not allowed)
 __1..__ -> null (would be .. which is not allowed)
 __1...__ -> ... (not recommended though)
 
```
parameter: filename: a simple file name \(not a path\)
return: the expected primary class name \(that should be defined inside the script file\); on         error, the method returns null

