public function strToTopology( $str ) {
        $len = strlen( $str );
        $data = array(
            'str' => '',
            'u' => 0,
            'l' => 0,
            'd' => 0,
            's' => 0
        );
        
        //loop through each letter and build the topology
        //and count the letter types
        for( $i = 0; $i < $len; $i++ )  {
            if( ctype_upper( $str[$i]  ) ) {
                    $str[$i] = 'u';
                    $data['u']++;
            } elseif( ctype_lower( $str[$i] ) ) {
                    $str[$i] = 'l';
                    $data['l']++;
            } elseif( ctype_digit( $str[$i] ) ) {
                    $str[$i] = 'd';
                    $data['d']++;
            } else {
                    $str[$i] = 's';
                    $data['s']++;
            }
        }

        $data['str'] = $str;
        
        return $data;
    }