Skip to content

Commit adb8290

Browse files
author
markusmichalski-fc
committed
71397: added .idea-folder to gitignore and cleanFilename static function to Functions.php
1 parent 7860ecc commit adb8290

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/nbproject/private/
2-
/nbproject/
2+
/nbproject/
3+
/.idea

src/FatFramework/Functions.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,18 @@ public static function stripString($sString) {
120120

121121
return $sStrippedString;
122122
}
123+
124+
/**
125+
* Strip unwanted chars from a filename.
126+
*
127+
* @param string $sFilename
128+
* @return string
129+
*/
130+
public static function cleanFilename(string $sFilename): string
131+
{
132+
return str_replace(
133+
array('+', ' ','ä','Ä','ü','Ü','ö','Ö','ß'),
134+
array('','','ae','ae','ue','ue','oe','oe', 'ss'), $sFilename
135+
);
136+
}
123137
}

0 commit comments

Comments
 (0)