+sub str_analyze
+{
+ # Martin A. Hansen, July 2009.
+
+ # Analyzes the string composition of a given string.
+
+ my ( $str, # string to analyze
+ ) = @_;
+
+ # Returns hash
+
+ my ( @composition, %hash, $i );
+
+ @composition = Maasha::Common::str_analyze_C( $str );
+
+ for ( $i = 32; $i <= 126; $i++ ) { # Only include printable chars
+ $hash{ chr $i } = $composition[ $i ]
+ }
+
+ return wantarray ? %hash : \%hash;
+}
+
+