; docformat = 'rst' ;+ ; Merges a string array into a single string separated by carriage ; return/linefeeds. Will use just linefeed on UNIX platforms and both on ; Windows platforms unless the UNIX or WINDOWS keywords are set to force a ; particular separator. ; ; :Returns: ; string ; ; :Params: ; s : in, required, type=strarr ; string array to merge ; ; :Keywords: ; unix : in, optional, type=boolean ; use just linefeed ; windows : in, optional, type=boolean ; use carriage return and linefeed ;- function mg_strmerge, s, unix=unix, windows=windows compile_opt strictarr case 1 of keyword_set(unix): crlf = string([10B]) keyword_set(windows): crlf = string([13B, 10B]) else: crlf = string(!version.os_family eq 'unix' ? [10B] : [13B, 10B]) endcase return, strjoin(s, crlf) end