Re: A better way than foreach with this?

2015-08-24 Thread Joel via Digitalmars-d-learn
On Monday, 24 August 2015 at 06:17:02 UTC, ted wrote: try: auto names1 = names.map!( a => replace(a, "_"," ")); ...not sure how to do it in-place though. Joel wrote: auto names = "Alef Bet Gimel Dalet He Vav Zayen Het Tet Yod Final_Kaf " "Kaf Lamed Final_Mem Mem Final_Nun Nun Samekh Ayin Fi

Re: A better way than foreach with this?

2015-08-24 Thread Joel via Digitalmars-d-learn
On Monday, 24 August 2015 at 06:13:50 UTC, Jacob Carlborg wrote: On 2015-08-24 07:58, Joel wrote: auto names = "Alef Bet Gimel Dalet He Vav Zayen Het Tet Yod Final_Kaf " "Kaf Lamed Final_Mem Mem Final_Nun Nun Samekh Ayin Final_Pe " "Pe Final_Tsadi T

Re: A better way than foreach with this?

2015-08-23 Thread ted via Digitalmars-d-learn
try: auto names1 = names.map!( a => replace(a, "_"," ")); ...not sure how to do it in-place though. Joel wrote: > auto names = > "Alef Bet Gimel Dalet He Vav Zayen Het Tet Yod Final_Kaf " > "Kaf Lamed Final_Mem Mem Final_Nun Nun Samekh Ayin Final_Pe " > "Pe Final_Tsadi Tsadi Qof Resh Shin Tav"

Re: A better way than foreach with this?

2015-08-23 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-08-24 07:58, Joel wrote: auto names = "Alef Bet Gimel Dalet He Vav Zayen Het Tet Yod Final_Kaf " "Kaf Lamed Final_Mem Mem Final_Nun Nun Samekh Ayin Final_Pe " "Pe Final_Tsadi Tsadi Qof Resh Shin Tav".split; foreach (ref name; names)

A better way than foreach with this?

2015-08-23 Thread Joel via Digitalmars-d-learn
auto names = "Alef Bet Gimel Dalet He Vav Zayen Het Tet Yod Final_Kaf " "Kaf Lamed Final_Mem Mem Final_Nun Nun Samekh Ayin Final_Pe " "Pe Final_Tsadi Tsadi Qof Resh Shin Tav".split; foreach (ref name; names)