4 added 140 characters in body
source | link

MATL, 8 bytes

otX>cwA)

Input is a cell array of strings, in the format {'abcd' 'efg'}

Try it online!

As an aside, this also works for more than two strings.

Explanation

Consider input {'blended' 'bold'}. The stack is shown upside down, with more recent elements below.

o    % Implicitly input a cell array of strongs. Convert to numeric
     % vector of code points. This right-pads with zeros if needed
     %   STACK: [98 108 101 110 100 101 100;
                 98 111 108 100   0   0   0]
tX>  % Duplicate. Maximum of each column
     %   STACK: [98 108 101 110 100 101 100;
                 98 111 108 100   0   0   0],
                [98 111 108 110 100 101 100]
c    % Convert to char
     %   STACK: [98 108 101 110 100 101 100;
                 98 111 108 100   0   0   0],
                'bolnded'
w    % Swap
     %   STACK: 'bolnded'
                [98 108 101 110 100 101 100;
                 98 111 108 100   0   0   0]
A    % All: gives true (shown as 1) for columns containing only nonzeros
     %   STACK: 'bolnded'
                [1 1 1 1 0 0 0]
)    % Use as logical index (mask). Implicitly display
     %   STACK: 'boln'

MATL, 8 bytes

otX>cwA)

Input is a cell array of strings, in the format {'abcd' 'efg'}

Try it online!

Explanation

Consider input {'blended' 'bold'}. The stack is shown upside down, with more recent elements below.

o    % Implicitly input a cell array of strongs. Convert to numeric
     % vector of code points. This right-pads with zeros if needed
     %   STACK: [98 108 101 110 100 101 100;
                 98 111 108 100   0   0   0]
tX>  % Duplicate. Maximum of each column
     %   STACK: [98 108 101 110 100 101 100;
                 98 111 108 100   0   0   0],
                [98 111 108 110 100 101 100]
c    % Convert to char
     %   STACK: [98 108 101 110 100 101 100;
                 98 111 108 100   0   0   0],
                'bolnded'
w    % Swap
     %   STACK: 'bolnded'
                [98 108 101 110 100 101 100;
                 98 111 108 100   0   0   0]
A    % All: gives true (shown as 1) for columns containing only nonzeros
     %   STACK: 'bolnded'
                [1 1 1 1 0 0 0]
)    % Use as logical index (mask). Implicitly display
     %   STACK: 'boln'

MATL, 8 bytes

otX>cwA)

Input is a cell array of strings, in the format {'abcd' 'efg'}

Try it online!

As an aside, this also works for more than two strings.

Explanation

Consider input {'blended' 'bold'}. The stack is shown upside down, with more recent elements below.

o    % Implicitly input a cell array of strongs. Convert to numeric
     % vector of code points. This right-pads with zeros if needed
     %   STACK: [98 108 101 110 100 101 100;
                 98 111 108 100   0   0   0]
tX>  % Duplicate. Maximum of each column
     %   STACK: [98 108 101 110 100 101 100;
                 98 111 108 100   0   0   0],
                [98 111 108 110 100 101 100]
c    % Convert to char
     %   STACK: [98 108 101 110 100 101 100;
                 98 111 108 100   0   0   0],
                'bolnded'
w    % Swap
     %   STACK: 'bolnded'
                [98 108 101 110 100 101 100;
                 98 111 108 100   0   0   0]
A    % All: gives true (shown as 1) for columns containing only nonzeros
     %   STACK: 'bolnded'
                [1 1 1 1 0 0 0]
)    % Use as logical index (mask). Implicitly display
     %   STACK: 'boln'
3 added 1124 characters in body
source | link

MATL, 8 bytes

otX>cwA)

Input is a cell array of strings, in the format {'abcd' 'efg'}

Try it online!

Explanation

Consider input {'blended' 'bold'}. The stack is shown upside down, with more recent elements below.

o    % Implicitly input a cell array of strongs. Convert to numeric
     % vector of code points. This right-pads with zeros if needed
     %   STACK: [98 108 101 110 100 101 100;
                 98 111 108 100   0   0   0]
tX>  % Duplicate. Maximum of each column
     %   STACK: [98 108 101 110 100 101 100;
                 98 111 108 100   0   0   0],
                [98 111 108 110 100 101 100]
c    % Convert to char
     %   STACK: [98 108 101 110 100 101 100;
                 98 111 108 100   0   0   0],
                'bolnded'
w    % Swap
     %   STACK: 'bolnded'
                [98 108 101 110 100 101 100;
                 98 111 108 100   0   0   0]
A    % All: gives true (shown as 1) for columns containing only nonzeros
     %   STACK: 'bolnded'
                [1 1 1 1 0 0 0]
)    % Use as logical index (mask). Implicitly display
     %   STACK: 'boln'

MATL, 8 bytes

otX>cwA)

Input is a cell array of strings, in the format {'abcd' 'efg'}

Try it online!

MATL, 8 bytes

otX>cwA)

Input is a cell array of strings, in the format {'abcd' 'efg'}

Try it online!

Explanation

Consider input {'blended' 'bold'}. The stack is shown upside down, with more recent elements below.

o    % Implicitly input a cell array of strongs. Convert to numeric
     % vector of code points. This right-pads with zeros if needed
     %   STACK: [98 108 101 110 100 101 100;
                 98 111 108 100   0   0   0]
tX>  % Duplicate. Maximum of each column
     %   STACK: [98 108 101 110 100 101 100;
                 98 111 108 100   0   0   0],
                [98 111 108 110 100 101 100]
c    % Convert to char
     %   STACK: [98 108 101 110 100 101 100;
                 98 111 108 100   0   0   0],
                'bolnded'
w    % Swap
     %   STACK: 'bolnded'
                [98 108 101 110 100 101 100;
                 98 111 108 100   0   0   0]
A    % All: gives true (shown as 1) for columns containing only nonzeros
     %   STACK: 'bolnded'
                [1 1 1 1 0 0 0]
)    % Use as logical index (mask). Implicitly display
     %   STACK: 'boln'
2 added 68 characters in body
source | link

MATL, 8 bytes

otX>cwA)

Input is a cell array of strings, in the format {'abcd' 'efg'}

Try it online!

MATL, 8 bytes

otX>cwA)

Try it online!

MATL, 8 bytes

otX>cwA)

Input is a cell array of strings, in the format {'abcd' 'efg'}

Try it online!

1
source | link