axiosengine/axios/Engine/Extensions/String.cs
nathan@daedalus 7d3c8a9f39 + * - Adding properties in DrawableAxiosGameObject to turn on/off the following:
+ *   - AdjustUnits
+ *   - RelativeToCamera
+ * - Cleaning and sorting using statements
2012-03-24 18:06:51 -05:00

20 lines
662 B
C#

namespace Axios.Engine.Extenions
{
public static class AxiosExtensions_String
{
/// <summary>
/// Get the string slice between the two indexes.
/// Inclusive for start index, exclusive for end index.
/// </summary>
public static string Slice(this string source, int start, int end)
{
if (end < 0) // Keep this for negative end support
{
end = source.Length + end;
}
int len = end - start; // Calculate length
return source.Substring(start, len); // Return Substring of length
}
}
}