Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

return 2 strings

 
Anthony Smith
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got a function, and I want to return 2 string? What should I do?
 
Anthony Villanueva
Ranch Hand
Posts: 1055
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could return a:
1. String []
2. List containing your Strings
3. a user-defined class that aggregates 2 Strings
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or a single string that is the concatenation of the two desired return values seperated by some character or character sequence.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic