Fixed a possible compilation bug in getopt.
Added non-copy trim functions and a split fonction for strings.