paulroth3d / jupyter-ijavascript-utils

Utility library for working with iJavaScript - a Jupyter Kernel
1 stars 0 forks source link

allow replacing a string with either a map or a tuple collection of strings #52

Closed paulroth3d closed 10 months ago

paulroth3d commented 10 months ago

sometimes there is a clear dictionary / set of tuples that we want to replace like str.replace(/\bwith\b/g, ',').replace(/\band\b/, ',').replace(/\bincluding\b/, ',')...

lets make it easier to import a list to make it easier to import and replace the list.

like replaceList = [[/\bwith\b/, ','], [' and ', ',']]; utils.format.replaceStrings(str, replaceList);

paulroth3d commented 10 months ago

available in build 1.37/1.38 - format.replaceString