Skip to main content
Commonmark migration
Source Link

#Powershell 48 bytes

Powershell 48 bytes

param([char[]]$a,[char[]]$b)![bool](diff $a $b)

Cast incoming strings as an array of char. Use diff (compare-object) on the two objects and cast as bool. Since a blank result (diff only shows differences not similarities) is False, negating it with ! will result in true for identical strings.

Added benefit: it will work on any arbitrary length strings (if equal whitespace).

#Powershell 48 bytes

param([char[]]$a,[char[]]$b)![bool](diff $a $b)

Cast incoming strings as an array of char. Use diff (compare-object) on the two objects and cast as bool. Since a blank result (diff only shows differences not similarities) is False, negating it with ! will result in true for identical strings.

Added benefit: it will work on any arbitrary length strings (if equal whitespace).

Powershell 48 bytes

param([char[]]$a,[char[]]$b)![bool](diff $a $b)

Cast incoming strings as an array of char. Use diff (compare-object) on the two objects and cast as bool. Since a blank result (diff only shows differences not similarities) is False, negating it with ! will result in true for identical strings.

Added benefit: it will work on any arbitrary length strings (if equal whitespace).

Source Link

#Powershell 48 bytes

param([char[]]$a,[char[]]$b)![bool](diff $a $b)

Cast incoming strings as an array of char. Use diff (compare-object) on the two objects and cast as bool. Since a blank result (diff only shows differences not similarities) is False, negating it with ! will result in true for identical strings.

Added benefit: it will work on any arbitrary length strings (if equal whitespace).