schwarper

Results 5 comments of schwarper

https://github.com/roflmuffin/CounterStrikeSharp/pull/504 I improved this a bit.

> I'd also like the enumerator version maybe? from #504 I thought that getting arg once and split them is better than using GetArg multiple times. However, it might be...

> I think perhaps we are better off just having an `IEnumerable Args =>` that yields in a for loop without any index access, and just pay the performance cost...

```csharp public static IEnumerable GetArgs(CommandInfo info, int startIndex = 0, int endIndex = -1) { if (string.IsNullOrEmpty(info.ArgString)) return []; string[] args = info.ArgString.Split(' ', StringSplitOptions.RemoveEmptyEntries); int lastIndex = args.Length -...

![image](https://github.com/user-attachments/assets/87358b9d-e339-42d0-aba0-9053ad54309c)