Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform foundation methods #34

Open
angelolloqui opened this issue Oct 31, 2017 · 2 comments
Open

Transform foundation methods #34

angelolloqui opened this issue Oct 31, 2017 · 2 comments

Comments

@angelolloqui
Copy link
Owner

angelolloqui commented Oct 31, 2017

List of some methods that could be transformed.

On List:

  • list.first --> list.firstOrNull()
  • list.last --> list.lastOrNull()
  • list.count --> list.size
  • list.isEmpty --> list.isEmpty()
  • list.index(of: a) --> list.indexOf(a)
  • list.append(element) --> list.add(element)
  • list.remove(at: index) --> list.removeAt(index)
  • list.sorted(by: lambda) --> sortedWith(comparator = Comparator(lambda))
  • list.joined(separator: joiner) --> elements. joinToString(separator = joiner)

On String:

  • string.count --> string.length
  • string.uppercased() --> string.toUpperCase()
  • string.lowercased() --> string.toLowerCase()
@angelolloqui
Copy link
Owner Author

Check #14 also

@angelolloqui
Copy link
Owner Author

Work started with 8b94a81 but still WIP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant