|
Clean way to do string.join: msg#00196org.user-groups.dotnet.padnug
Hi all: I like to use a lot string functions since formulating an expression can be a pain. I tried to use string.join to make a simple AND clause, "X AND Y AND Z", any of them can be empty, i.e., if X is empty, it becomes "Y AND Z". However I noticed string.join is not that smart, it does not treat empty string or null string differently, and output " AND Y AND Z". I hate to do an elaborate if else since I need to do multiple branches for different combinations. Any efficient way to address string.join's short coming? Shouldn't it no do a join if string element is empty? [Non-text portions of this message have been removed] |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: MSDN Event this Thursday is NOT cancelled!: 00196, Stuart Celarier |
|---|---|
| Next by Date: | RE: MSDN Event this Thursday is NOT cancelled!: 00196, Richard Augelli |
| Previous by Thread: | MSDN Event this Thursday is NOT cancelled!i: 00196, Stuart Celarier |
| Next by Thread: | Re: Clean way to do string.join: 00196, Craig Wagner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |