I'm using an header bar from the `clarity.design` examples, I tinkered with it trying to make the search input occupy 100% of the center of the header bar, but I'm unable to do it.

The code:

```html
<clr-header class="header-6">
    <div class="branding">
      <a [routerLink]="['/']" routerLinkActive="router-link-active"  class="nav-link">
        <span class="title">Project Clarity</span>
      </a>
    </div>

    <form class="search" (ngSubmit)="onSearchSubmit(f)" #f="ngForm">
      <label for="search_input"></label>
      <input id="search_input" name="search_input" type="text" placeholder=" Search for keywords or paste link..." ngModel required>
    </form>

    <div class="header-actions">
      <div class="header-nav" [clr-nav-level]="1">
        <a class="nav-link nav-text">
          My menu
        </a>
      </div>

      <clr-dropdown>
        <button class="nav-icon" clrDropdownTrigger>
          <clr-icon shape="user"></clr-icon>
          <clr-icon shape="caret down"></clr-icon>
        </button>
        <clr-dropdown-menu *clrIfOpen clrPosition="bottom-right">
          <a clrDropdownItem>Preferences</a>
          <a clrDropdownItem>Log out</a>
        </clr-dropdown-menu>
      </clr-dropdown>
    </div>
  </clr-header>
```

This is how it looks like, I want the header to use all the remaining width. 
[![bar screenshot](https://i.stack.imgur.com/aXW1t.png)](https://i.stack.imgur.com/aXW1t.png)

Thanks.
['https://Stackoverflow.com/questions/54962657', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4962126/']
Your code is okay. You could dismiss temporary results and chain method calls

```
var numbers = new StringBuilder();
string[] coordinatesVal = coordinateTxt
    .Trim()
    .Split(new string[] { ",0" }, StringSplitOptions.None);
for (int i = 0; i < coordinatesVal.Length - 1; i++) {
    numbers
        .Append(coordinatesVal[i].Trim().Replace(',', ' '))
        .Append(", ");
}
numbers.Length -= 2;

```

Note that the last statement assumes that there is at least one coordinate pair available. If the coordinates can be empty, you would have to enclose the loop and this last statement in `if (coordinatesVal.Length > 0 ) { ... }`. This is still more efficient than having an `if` inside the loop.
heres another way without *defining your own loops* and replace methods, or using LINQ.

```
 string coordinateTxt = @" -82.9494547,36.2913021,0
 -83.0784938,36.2347521,0
 -82.9537782,36.079235,0";

            string[] coordinatesVal = coordinateTxt.Replace(",", "*").Trim().Split(new string[] { "*0", Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
            string result = string.Join(",", coordinatesVal).Replace("*", " ");
            Console.WriteLine(result);

```

or even 

```
            string coordinateTxt = @" -82.9494540,36.2913021,0
-83.0784938,36.2347521,0
-82.9537782,36.079235,0";

            string result = coordinateTxt.Replace(Environment.NewLine, "").Replace($",", " ").Replace(" 0", ", ").Trim(new char[]{ ',',' ' });
            Console.WriteLine(result);

```