0
修改後的字符串我有一個數組紅寶石產生從陣列
["http://www.google.com", "http://www.yahoo.com", "http://www.weather.com"]
,我想以產生一個長字符串
<a href="http://www.google.com">http://www.google.com</a>, <a href="http://www.yahoo.com">http://www.yahoo.com</a>, <a href="http://www.weather.com">http://www.weather.com</a>
我知道我可以寫一個for循環,並且然後將數組的每個元素附加到長字符串兩次。有沒有一種方便的方法來做到這一點?