replaceDerivationPathIndex function
Implementation
String replaceDerivationPathIndex(String path, String suffix, int index) {
final pathArr = path.split('/');
pathArr.removeLast();
pathArr.add('${pathArr.removeLast()}$suffix');
pathArr.add(index.toString());
return pathArr.join('/');
}