diff --git a/src/core/config/OperationConfig.js b/src/core/config/OperationConfig.js index e1454d0a..ec47384d 100755 --- a/src/core/config/OperationConfig.js +++ b/src/core/config/OperationConfig.js @@ -2125,13 +2125,13 @@ const OperationConfig = { args: [ { name: "Split delimiter", - type: "binaryShortString", - value: StrUtils.SPLIT_DELIM + type: "editableOption", + value: StrUtils.SPLIT_DELIM_OPTIONS }, { name: "Join delimiter", - type: "option", - value: StrUtils.DELIMITER_OPTIONS + type: "editableOption", + value: StrUtils.JOIN_DELIM_OPTIONS } ] }, diff --git a/src/core/operations/StrUtils.js b/src/core/operations/StrUtils.js index 5c1f8f18..d3695893 100755 --- a/src/core/operations/StrUtils.js +++ b/src/core/operations/StrUtils.js @@ -65,12 +65,28 @@ const StrUtils = { * @constant * @default */ - SPLIT_DELIM: ",", + SPLIT_DELIM_OPTIONS: [ + {name: "Line feed", value: "\\n"}, + {name: "CRLF", value: "\\r\\n"}, + {name: "Space", value: " "}, + {name: "Comma", value: ","}, + {name: "Semi-colon", value: ";"}, + {name: "Colon", value: ":"}, + {name: "Nothing (separate chars)", value: ""} + ], /** * @constant * @default */ - DELIMITER_OPTIONS: ["Line feed", "CRLF", "Space", "Comma", "Semi-colon", "Colon", "Nothing (separate chars)"], + JOIN_DELIM_OPTIONS: [ + {name: "Line feed", value: "\\n"}, + {name: "CRLF", value: "\\r\\n"}, + {name: "Space", value: " "}, + {name: "Comma", value: ","}, + {name: "Semi-colon", value: ";"}, + {name: "Colon", value: ":"}, + {name: "Nothing (join chars)", value: ""} + ], /** * Split operation. @@ -80,8 +96,8 @@ const StrUtils = { * @returns {string} */ runSplit: function(input, args) { - let splitDelim = args[0] || StrUtils.SPLIT_DELIM, - joinDelim = Utils.charRep[args[1]], + let splitDelim = args[0], + joinDelim = args[1], sections = input.split(splitDelim); return sections.join(joinDelim);