In the “String functions” section in Chapter 4, “SQL Functions,” in the fourth paragraph the data type of the result should be LONG VARCHAR, not VARCHAR:
“Unless you supply a constant LENGTH argument to a function that produces a LONG VARCHAR result (such as SPACE or REPEAT), the default length is the maximum allowed.”