コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="range"></param>
        /// <returns></returns>
        public static Range <int> ToRange(this System.Range range)
        {
            var start = range.Start.IsFromEnd ? ~range.Start.Value : range.Start.Value;
            var end   = range.End.IsFromEnd ? ~range.End.Value : range.End.Value;

            return(end < start ? new Range <int>(end, start) : new Range <int>(start, end));
        }
コード例 #2
0
ファイル: AuthController.cs プロジェクト: war-man/Managix
        public IResponseOutput TestRang()
        {
            string str = "abcdefghijklmnopq";

            System.Range range = 1..4;

            var s1 = str[range];  //bcd
            var s2 = str[1..^ 1]; //bcdefghijklmnopq
コード例 #3
0
        public static T[] GetSubArray <T>(T[] array, System.Range range)
        {
            (int offset, int length) = range.GetOffsetAndLength(array.Length);
            var arr = new T[length];

            for (int i = 0; i < length; i++)
            {
                arr[i] = array[offset + i];
            }
            return(arr);
        }
コード例 #4
0
 public static System.Memory <T> AsMemory <T>(this T[] array, System.Range range)
 {
     throw null;
 }
コード例 #5
0
 public static System.ReadOnlyMemory <char> AsMemory(this string text, System.Range range)
 {
     throw null;
 }
コード例 #6
0
 public static System.Span <T> AsSpan <T>(this T[] array, System.Range range)
 {
     throw null;
 }
コード例 #7
0
 public static System.Span <T> AsSpan <T>(this System.ArraySegment <T> segment, System.Range range)
 {
     throw null;
 }
コード例 #8
0
 public bool TryFindLast(System.Utf8String value, System.StringComparison comparisonType, out System.Range range)
 {
     throw null;
 }
コード例 #9
0
 public bool TryFindLast(char value, out System.Range range)
 {
     throw null;
 }
コード例 #10
0
 public bool TryFind(System.Text.Rune value, System.StringComparison comparisonType, out System.Range range)
 {
     throw null;
 }
コード例 #11
0
 public System.Utf8String this[System.Range range] {
     get { throw null; }
 }
コード例 #12
0
 public static System.ReadOnlyMemory <byte> AsMemoryBytes(this System.Utf8String?text, System.Range range)
 {
     throw null;
 }
コード例 #13
0
 public bool TryFindLast(System.Text.Utf8Span value, out System.Range range)
 {
     throw null;
 }
コード例 #14
0
 public System.Text.Utf8Span this[System.Range range] {
     get { throw null; }
 }
コード例 #15
0
 public static System.Linq.IQueryable <TSource> Take <TSource>(this System.Linq.IQueryable <TSource> source, System.Range range)
 {
     throw null;
 }
コード例 #16
0
 public static T[] GetSubArray <T>(T[] array, System.Range range)
 {
     throw null;
 }
コード例 #17
0
 public static System.ReadOnlyMemory <System.Char8> AsMemory(this System.Utf8String?text, System.Range range)
 {
     throw null;
 }
コード例 #18
0
 public bool TryFindLast(System.Text.Rune value, out System.Range range)
 {
     throw null;
 }
コード例 #19
0
 public bool TryFindLast(System.Utf8String value, out System.Range range)
 {
     throw null;
 }
コード例 #20
0
 public System.ReadOnlySpan <T> AsSpan(System.Range range)
 {
     throw null;
 }