Remove dots from string when we are on Linux/OS X

@param fileName A filename string that might start with dots.
@return Cleanup string with no dots anymore.
165954
private static String removeStartingDots(String fileName) {
        // machte unter OS X/Linux Probleme, zB. bei dem Titel: "....Paula"
        while (!fileName.isEmpty() && (fileName.startsWith("."))) {
            fileName = fileName.substring(1, fileName.length());
        }
        return fileName;
    }
39376
protected String getFileName(String fileName) {
        int index = fileName.lastIndexOf('.');
        return (index == -1) ? fileName : fileName.substring(0, index);
    }
1175407
public String removeFileExtension(String fileName) {
        
        int dotIndex = fileName.lastIndexOf(".");
        if (dotIndex > 0) {
            fileName = fileName.substring(0, dotIndex);
        }
        
        return fileName;
    }
409540
protected void removeFile(String subdir, String filename) throws IOException {
        Path dir = root;
        if (subdir != null) {
            dir = dir.resolve(subdir);
        }
        Files.deleteIfExists(dir.resolve(filename));
    }
803187
public static function removeExtension($fileName) {
		$ext = strrchr($fileName, '.');
		if($ext !== false) {
			$fileName = substr($fileName, 0, -strlen($ext));
		}
		return $fileName;
	}
1154092
private static String removeLastDot(final String pkgName) {
		return pkgName.charAt(pkgName.length() - 1) == Characters.DOT ? pkgName.substring(0, pkgName.length() - 1) : pkgName;
	}
164247
public static String getPrefixOfFileName(String fileName) {
        int dotIndex = fileName.lastIndexOf(DOT);
        return dotIndex > 0 ? fileName.substring(0, dotIndex) : fileName;
    }
295589
public static String extName(String fileName) {
		if (fileName == null) {
			return null;
		}
		int index = fileName.lastIndexOf(StrUtil.DOT);
		if (index == -1) {
			return StrUtil.EMPTY;
		} else {
			String ext = fileName.substring(index + 1);
			// 扩展名中不能包含路径相关的符号
			return StrUtil.containsAny(ext, UNIX_SEPARATOR, WINDOWS_SEPARATOR) ? StrUtil.EMPTY : ext;
		}
	}
904087
public static String getFileSuffix(String fileName) {
        return fileName.substring(fileName.lastIndexOf(ValueConsts.DOT_SIGN) + 1);
    }
1078090
def file_remove(self, path, filename):
        
        if os.path.isfile(path + filename):
            os.remove(path + filename)
975398
public static String cleanNameWithAccents( String name ) {

		String temp = Normalizer.normalize( name, Normalizer.Form.NFD );
		Pattern pattern = Pattern.compile( "\\p{InCombiningDiacriticalMarks}+" );
		return pattern.matcher( temp ).replaceAll( "" ).trim();
	}
715765
protected static String removePackageName(String typeName) {
        int index = typeName.lastIndexOf('.');
        if (index >= 0) {
            typeName = typeName.substring(index + 1);
        }
        return typeName;
    }
223434
private function cleanUpFileName($fileName, $locale, $extension)
    {
        $pathInfo = pathinfo($fileName);
        $cleanedFileName = $this->get('sulu.content.path_cleaner')->cleanup($pathInfo['filename'], $locale);
        if ($extension) {
            $cleanedFileName .= '.' . $extension;
        }

        return $cleanedFileName;
    }
1159485
public static String getExtension(String fileName){
        int dot = fileName.lastIndexOf('.');
        return dot==-1 ? null : fileName.substring(dot+1);
    }
1362305
protected static String trimFileExtension(String fileName) {
		if (fileName.lastIndexOf('.') == -1) {
			return fileName;
		}
		return fileName.substring(0, fileName.lastIndexOf('.'));
	}
319856
private static String stripDotSuffix(final String value) {
        if (value == null) {
            return null;
        }
        final int index = value.indexOf(".");
        if (index != -1) {
            return value.substring(0, index);
        }
        return value;
    }
459007
public static String removeExtension(String fileName) {
		final String separator = FILE_SEPARATOR;
		String filename;
		// Remove the path upto the filename.
		final int lastSeparatorIndex = fileName.lastIndexOf(separator);
		if (lastSeparatorIndex == -1) {
			filename = fileName;
		} else {
			filename = fileName.substring(lastSeparatorIndex + 1);
		}

		// Remove the extension.
		final int extensionIndex = filename.lastIndexOf(".");
		if (extensionIndex == -1) {
			return filename;
		}
		fileName = fileName.substring(0, lastSeparatorIndex);
		return fileName + File.separator + filename.substring(0, extensionIndex);
	}