Update strings-utils.js

Added exceptions for invalid arguments, incorrect formats