Giving you two path, one is for the original path, and another is the parameter of the cd command.
For Example:
users/documents and stackOverFlow should return users/documents/stackOverFlow
and
users/documents and ../stackOverFlow should return users/stackOverFlow
and
users/documents/test and ../../stackOverFlow should return users/stackOverFlow
How can we implement such a method imitateCDCommand with two parameters str1 and str2 and return the destination path.
Aucun commentaire:
Enregistrer un commentaire