add replaceStr into str_functs.cpp
add LogicalSegment.cpp/h and update cppcommon for using stripStr