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

C#: Support imploding nested array #22

Open
ronnygunawan opened this issue Mar 29, 2022 · 1 comment
Open

C#: Support imploding nested array #22

ronnygunawan opened this issue Mar 29, 2022 · 1 comment
Labels
bug Something isn't working difficulty: easy good first issue Good for newcomers help wanted Extra attention is needed

Comments

@ronnygunawan
Copy link
Contributor

var arr = new[] { new [] { 1, 2, 3, 4, 5 } };
var str = PHP.Implode("+", arr);

Expected output:

str should be "1+2+3+4+5"

@ronnygunawan ronnygunawan added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Mar 29, 2022
@Ronin41
Copy link

Ronin41 commented May 30, 2022

Hello you should be able to use String.Join() to get the same functionality.

string[] arr = new string[]
            {
                "1",
                "2",
                "3",
                "4"
            };

            var str = (String.Join("+", arr));

            Console.Write(str); 
            Console.ReadKey();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working difficulty: easy good first issue Good for newcomers help wanted Extra attention is needed
Projects
Status: Backlog
Development

No branches or pull requests

4 participants