mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-26 12:05:04 +01:00
merge common implementations and server implementations
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
namespace SharpCifs.Util.Sharpen
|
||||
{
|
||||
public class StringTokenizer
|
||||
{
|
||||
private string[] _tokens;
|
||||
private int _pos;
|
||||
|
||||
public StringTokenizer(string text, string delim)
|
||||
{
|
||||
_tokens = text.Split(delim);
|
||||
}
|
||||
|
||||
public int CountTokens()
|
||||
{
|
||||
return _tokens.Length;
|
||||
}
|
||||
|
||||
public string NextToken()
|
||||
{
|
||||
string value = _tokens[_pos];
|
||||
|
||||
_pos++;
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
public bool HasMoreTokens()
|
||||
{
|
||||
return _pos < _tokens.Length;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user