diff --git a/src/rdf-mappings/functions.py b/src/rdf-mappings/functions.py
index aafcca0a690924475858d0a01612d15505a66b02..28608a74c35387fce3f7967fd53a9669de0d0ff7 100644
--- a/src/rdf-mappings/functions.py
+++ b/src/rdf-mappings/functions.py
@@ -37,4 +37,16 @@ def serialize_graph(g, output_file_list):
         file_format = output_option['file_format']
         g.serialize(destination=output_rdf_path, format=file_format)
 
-        print(f'Created {output_rdf_path}')
\ No newline at end of file
+        print(f'Created {output_rdf_path}')
+
+def clean_class_name_string(input_string):
+    """
+    Cleans string that is to be used as a class name from unwanted characters.
+    """
+
+    char_list = ["'", '"', '.', '+', ',', '*', '&', '/', '=', '’', ';', '¨', '#', '?', '\n']
+
+    for char in char_list:
+        input_string = input_string.replace(char, '')
+
+    return input_string
\ No newline at end of file