Exemplo n.º 1
0
	def __init__(self, data, args=()):
		"""
		Receive the data to be converted and parameters.
		"""
		self.value = data

		if not data:
			return

		try:
			s_from = args[0]
			s_to = args[1]
			self.value = Strings.replace_string(data, s_from, s_to)
		except IndexError:
			print("Error: StringReplace takes exactly 2 arguments (%s given): %s" % (len(args), args) )
		except Exception, e:
			print(e)