Given an input of two integers n and m, output an ASCII ladder of length n and size m.
This is an ASCII ladder of length 3 and size 3:
o---o | | | | | | +---+ | | | | | | +---+ | | | | | | o---o
This is an ASCII ladder of length 5 and size 1:
o-o | | +-+ | | +-+ | | +-+ | | +-+ | | o-o
This is an ASCII ladder of length 2 and size 5:
o-----o | | | | | | | | | | +-----+ | | | | | | | | | | o-----o
To be specific:
The length (n) represents how many squares the ladder is made up of.
The size (m) represents the width and height of the interior of—that is, not counting the "borders"—each square.
Each square is made up of the interior area filled with spaces, surrounded by
-s on the top and bottom,
|s on the left and right, and
+s at all four corners.
Borders between squares merge together, so two lines in a row with
+--...--+merge into one.
The corners of the entire ladder are replaced with the character
You may optionally output a trailing newline.
The length of the ladder (n) will always be ≥ 2, and the size (m) will always be ≥ 1.
Input can be taken as a whitespace-/comma-separated string, an array/list/etc., or two function/command line/etc. arguments. The arguments can be taken in whichever order is most convenient / golfiest.
Since this is code-golf, the shortest code in bytes wins.
Tip: The examples above can also be used as test cases.