string handle with ansi C like php implement