Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias wordmatch {
- var %a $1
- var %b $2
- if ($len(%a) != $len(%b)) {
- return false
- }
- else {
- while ($len(%a) > 0) {
- var %l $left(%a,1)
- if ($count(%a,%l) == $count(%b,%l)) {
- var %a $remove(%a,%l)
- var %b $remove(%b,%l)
- }
- else {
- return false
- }
- }
- return true
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement