def modify_if_needed(str, include_endian = true)
      base = if @tags[:signedness] == :signed
        str.swapcase
      else
        str
      end
      if include_endian
        modify_for_endianness(base)
      else
        base
      end
    end
def modify_if_needed(str, include_endian = true)
      base = if @tags[:signedness] == :signed
        str.swapcase
      else
        str
      end
      if include_endian
        modify_for_endianness(base)
      else
        base
      end
    end
Modifies the given string if it's needed, according to
 signness and endianness.  This assumes that a signed
 directive should be in lowercase.

 @param str [String] the string to modify.
 @param include_endian [Boolean] whether or not to include the
   endianness.
 @return [String]