mirror of
https://github.com/mgroves/MonodroidStockPortfolio.git
synced 2025-01-06 03:00:18 +00:00
32 lines
606 B
C#
32 lines
606 B
C#
|
using System;
|
||
|
|
||
|
namespace FileHelpers
|
||
|
{
|
||
|
internal sealed class ConditionHelper
|
||
|
{
|
||
|
private ConditionHelper()
|
||
|
{}
|
||
|
|
||
|
public static bool BeginsWith(string line, string selector)
|
||
|
{
|
||
|
return line.StartsWith(selector);
|
||
|
}
|
||
|
|
||
|
public static bool EndsWith(string line, string selector)
|
||
|
{
|
||
|
return line.EndsWith(selector);
|
||
|
}
|
||
|
|
||
|
public static bool Contains(string line, string selector)
|
||
|
{
|
||
|
return line.IndexOf(selector) >= 0;
|
||
|
}
|
||
|
|
||
|
public static bool Enclosed(string line, string selector)
|
||
|
{
|
||
|
return line.StartsWith(selector) && line.EndsWith(selector);
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|