+CharString &CharString::appendPathPart(const StringPiece &s, UErrorCode &errorCode) {
+ if(U_FAILURE(errorCode)) {
+ return *this;
+ }
+ if(s.length()==0) {
+ return *this;
+ }
+ char c;
+ if(len>0 && (c=buffer[len-1])!=U_FILE_SEP_CHAR && c!=U_FILE_ALT_SEP_CHAR) {
+ append(U_FILE_SEP_CHAR, errorCode);
+ }
+ append(s, errorCode);
+ return *this;
+}
+