String Functions and Operators • LPAD( str , len , padstr ) • LTRIM( str ) • MAKE_SET( bits , str1 , str2 ,...) • MID( str , pos , len ) • OCT( N ) • OCTET_LENGTH( str ) • ORD( str ) Returns the string  str , left-padded with the string  padstr  to a length of  len  characters. If  str  is longer than  len , the return value is shortened to  len  characters. mysql>  SELECT LPAD(’hi’,4,’??’); -> ’??hi’ mysql>  SELECT LPAD(’hi’,1,’??’); -> ’h’ Returns the string  str  with leading space characters removed. mysql>  SELECT LTRIM(’ barbar’); -> ’barbar’ This function is multibyte safe. Returns a set value (a string containing substrings separated by  ,  characters) consisting of the strings that have the corresponding bit in  bits  set.  str1  corresponds to bit 0,  str2  to bit 1, and so on.  NULL values in  str1 ,  str2 ,  ...  are not appended to the result. mysql>  SELECT MAKE_SET(1,’a’,’b’,’c’); -> ’a’ mysql>  SELECT MAKE_SET(1 | 4,’hello’,’nice’,’world’); -> ’hello,world’ mysql>  SELECT MAKE_SET(1 | 4,’hello’,’nice’,NULL,’world’); -> ’hello’ mysql>  SELECT MAKE_SET(0,’a’,’b’,’c’); -> ’’ MID( str , pos , len )  is a synonym for  SUBSTRING( str , pos , len ) . Returns a string representation of the octal value of  N , where  N  is a longlong ( BIGINT ) number. This is equivalent to  CONV( N ,10,8) . Returns  NULL  if  N  is  NULL . mysql>  SELECT OCT(12); -> ’14’ OCTET_LENGTH()  is a synonym for  LENGTH() . If the leftmost character of the string  str  is a multibyte character, returns the code for that character, calculated from the numeric values of its constituent bytes using this formula: (1st byte code) + (2nd byte code * 256) 2179