小编Sar*_*yan的帖子

ruby比较两个共同的数组

我希望能够比较两个共同的数组,而不是重复.

array1 = ['1. walking to the park to find some ice cream']
array2 = ['2. walking to the park to find ice cream and find more ice cream']
Run Code Online (Sandbox Code Playgroud)

样本输出:

walking to the park find ice cream
Run Code Online (Sandbox Code Playgroud)

ruby

0
推荐指数
1
解决办法
65
查看次数

-1
推荐指数
1
解决办法
3603
查看次数

标签 统计

ruby ×2