read stdin string

* stdin string does not contain \0
* find . -type d -> .gitignore
add some notes
fixed some error
append \0 to solve strange string issue