Paradox Game Engine
v1.0.0 beta06
Main Page
Related Pages
Packages
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Events
Macros
Pages
StringSpanExtensions.cs
Go to the documentation of this file.
1
// Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2
// This file is distributed under GPL v3. See LICENSE.md for details.
3
namespace
SiliconStudio.Core
4
{
5
public
static
class
StringSpanExtensions
6
{
7
/// <summary>
8
/// Gets the substring with the specified span. If the span is invalid, return null.
9
/// </summary>
10
/// <param name="str">The string.</param>
11
/// <param name="span">The span.</param>
12
/// <returns>A substring with the specified span or null if span is empty.</returns>
13
public
static
string
Substring
(
this
string
str,
StringSpan
span)
14
{
15
return
span.IsValid ? str.Substring(span.Start, span.Length) : null;
16
}
17
}
18
}
SiliconStudio.Core.StringSpanExtensions
Definition:
StringSpanExtensions.cs:5
SiliconStudio.Core.StringSpanExtensions.Substring
static string Substring(this string str, StringSpan span)
Gets the substring with the specified span. If the span is invalid, return null.
Definition:
StringSpanExtensions.cs:13
SiliconStudio.Core.StringSpan
A region of character in a string.
Definition:
StringSpan.cs:12
sources
common
core
SiliconStudio.Core.Design
StringSpanExtensions.cs
Generated on Sat Dec 20 2014 21:51:01 for Paradox Game Engine by
1.8.7