Still a StringΒΆ

While ADSString expands your feature engineering capabilities, it can still be treated as a str object. Any standard operation on str is preserved in ADSString. For instance, you can convert it to lowercase:

hello_world = "HELLO WORLD"
s = ADSString(hello_world)
s.lower()
'hello world'

You could split a text string.

s.split()
['HELLO', 'WORLD']

You can use all the str methods, such as the .replace() method, to replace text.

s.replace("L", "N")
'HENNO WORND'

You can perform a number of str manipulation operations, such as .lower() and .upper() to get an ADSString object back.

isinstance(s.lower().upper(), ADSString)
True

While a new ADSString object is created with str manipulation operations, the equality operation holds.

s.lower().upper() == s
True

The equality operation even holds between ADSString objects (s) and str objects (hello_world).

s == hello_world
True