Skip to main content
added 36 characters in body
Source Link
Luis Mendo
  • 106.7k
  • 10
  • 139
  • 382

MATL, 12 bytes

c32-p95\32+c 

Try it online!

Explanation

c % Implicitly input cell array of 2 strings. Convert to 2-row char matrix. % This pads the shorter string with spaces 32- % Subtract 32, (charselement-wise. areEach intepretedchar is interpreted as theirits ASCII code points). Note that % Note that padding spaces will give 0. p % Product of each column. Since (padding) spaces have been mapped to 0, the % product effectively eliminates those colums. So the effect is the same as % if string length had been limited by the shorter one 95\ % Modulo 95, element-wise 32+ % Add 32, element-wise c % Convert to char. Implicitly display 

MATL, 12 bytes

c32-p95\32+c 

Try it online!

Explanation

c % Implicitly input cell array of 2 strings. Convert to 2-row char matrix. % This pads the shorter string with spaces 32- % Subtract 32 (chars are intepreted as their ASCII code points). Note that % padding spaces will give 0. p % Product of each column. Since (padding) spaces have been mapped to 0, the % product effectively eliminates those colums. So the effect is the same as % if string length had been limited by the shorter one 95\ % Modulo 95 32+ % Add 32 c % Convert to char. Implicitly display 

MATL, 12 bytes

c32-p95\32+c 

Try it online!

Explanation

c % Implicitly input cell array of 2 strings. Convert to 2-row char matrix. % This pads the shorter string with spaces 32- % Subtract 32, element-wise. Each char is interpreted as its ASCII code. % Note that padding spaces will give 0. p % Product of each column. Since (padding) spaces have been mapped to 0, the % product effectively eliminates those colums. So the effect is the same as % if string length had been limited by the shorter one 95\ % Modulo 95, element-wise 32+ % Add 32, element-wise c % Convert to char. Implicitly display 
added 259 characters in body
Source Link
Luis Mendo
  • 106.7k
  • 10
  • 139
  • 382

MATL, 12 bytes

c32-p95\32+c 

Try it online!

Explanation

c % Implicitly input cell array of 2 strings. Convert to 2-row char matrix. % This pads the shorter string with spaces 32- % Subtract 32 (chars are intepreted as their ASCII code points). Note that % padding spaces will give 0. p % Product of each column. Since (padding) spaces have been mapped to 0, the % product effectively eliminates those colums. So the effect is the same as % if string length had been limited by the shorter one 95\ % Modulo 95 32+ % Add 32 c % Convert to char. Implicitly display 

MATL, 12 bytes

c32-p95\32+c 

Try it online!

Explanation

c % Implicitly input cell array of 2 strings. Convert to 2-row char matrix. % This pads the shorter string with spaces 32- % Subtract 32 (chars are intepreted as their ASCII code points) p % Product of each column 95\ % Modulo 95 32+ % Add 32 c % Convert to char. Implicitly display 

MATL, 12 bytes

c32-p95\32+c 

Try it online!

Explanation

c % Implicitly input cell array of 2 strings. Convert to 2-row char matrix. % This pads the shorter string with spaces 32- % Subtract 32 (chars are intepreted as their ASCII code points). Note that % padding spaces will give 0. p % Product of each column. Since (padding) spaces have been mapped to 0, the % product effectively eliminates those colums. So the effect is the same as % if string length had been limited by the shorter one 95\ % Modulo 95 32+ % Add 32 c % Convert to char. Implicitly display 
Source Link
Luis Mendo
  • 106.7k
  • 10
  • 139
  • 382

MATL, 12 bytes

c32-p95\32+c 

Try it online!

Explanation

c % Implicitly input cell array of 2 strings. Convert to 2-row char matrix. % This pads the shorter string with spaces 32- % Subtract 32 (chars are intepreted as their ASCII code points) p % Product of each column 95\ % Modulo 95 32+ % Add 32 c % Convert to char. Implicitly display