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

Make String::concat take ArrayView[T] #1148

Open
tonyfettes opened this issue Oct 20, 2024 · 0 comments
Open

Make String::concat take ArrayView[T] #1148

tonyfettes opened this issue Oct 20, 2024 · 0 comments

Comments

@tonyfettes
Copy link
Contributor

tonyfettes commented Oct 20, 2024

I was writing a MoonBit code generate to automate the implementation of some trait for tuple in MoonBit, and when I was trying to build the type of tuple (A, B, C, ...), I found there is no way to concat an ArrayView[String] into a String with some separator.

Example code:

let type_names = ["A", "B", ...]

fn build_tuple_type(length : Int) -> String {
  String::concat(type_names[:length], separator=", ")
}

Therefore, I wish there is a way to concat an ArrayView[T] with a separator.

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

No branches or pull requests

1 participant