comparison Tools/DocGen/Content/Doc/Data/LinqStringFunctions.txt @ 0:f990fcb411a9

Копия текущей версии из github
author cin
date Thu, 27 Mar 2014 21:46:09 +0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f990fcb411a9
1 * All data providers
2 | Length | s.Length | Sql.Length(s)
3 | Substring | s.Substring (a) | Sql.Substring(s, a + 1, Sql.Length(s) - a)
4 | Substring | s.Substring (a, b) | Sql.Substring(s, a + 1, b)
5 | IndexOf | s.IndexOf (a) | Sql.Length(a) == 0 ? 0 : (Sql.CharIndex(a, s) ?? 0) - 1
6 | IndexOf | s.IndexOf (a, b) | Sql.Length(a) == 0 && Sql.Length(s) > b ? b : (Sql.CharIndex(a, s, b + 1) ?? 0) - 1
7 | IndexOf | s.IndexOf (a, b, c) | Sql.Length(a) == 0 && Sql.Length(s) > b ? b : (Sql.CharIndex(a, Sql.Left(s, c), b) ?? 0) - 1
8 | LastIndexOf | s.LastIndexOf(a) | Sql.Length(a) == 0 ? Sql.Length(s) - 1 :<br>(Sql.CharIndex(a, s) ?? 0) == 0 ? -1 :<br>&nbsp;&nbsp;Sql.Length(s) - (Sql.CharIndex(Sql.Reverse(a), Sql.Reverse(s)) ?? 0) - Sql.Length(a) + 1
9 | LastIndexOf | s.LastIndexOf(a, b) | Sql.Length(a) == 0 ? b :<br>(Sql.CharIndex(a, s, b + 1) ?? 0) == 0 ? -1 :<br>&nbsp;&nbsp;Sql.Length(s) - (Sql.CharIndex(Sql.Reverse(a), Sql.Reverse(Sql.Substring(s, b + 1, Sql.Length(s) - b))) ?? 0) - Sql.Length(a) + 1
10 | LastIndexOf | s.LastIndexOf(a, b, c) | Sql.Length(a) == 0 ? b :<br>(Sql.CharIndex(a, Sql.Left(s, b + c), b + 1) ?? 0) == 0 ? -1 :<br>&nbsp;&nbsp;b + c - (Sql.CharIndex(Sql.Reverse(a), Sql.Reverse(Sql.Substring(s, b + 1, c))) ?? 0) - Sql.Length(a) + 1
11 | Insert | s.Insert (a, b) | Sql.Length(s) == a ? s + b : Sql.Stuff(s, a + 1, 0, b)
12 | Remove | s.Remove (a) | Sql.Left(s, a)
13 | Remove | s.Remove (a, b) | Sql.Stuff(s, a + 1, b, "")
14 | Pad | s.PadLeft (a) | Sql.PadLeft(s, a, ' ')
15 | Pad | s.PadLeft (a, b) | Sql.PadLeft(s, a, b)
16 | Pad | s.PadRight (a) | Sql.PadRight(s, a, ' ')
17 | Pad | s.PadRight (a, b) | Sql.PadRight(s, a, b)
18 | Replace | s.Replace (a, b) | Sql.Replace(s, a, b)
19 | Trim | s.Trim () | Sql.Trim(s)
20 | Trim | s.TrimEnd () | Sql.TrimRight(s)
21 | Trim | s.TrimStart () | Sql.TrimLeft(s)
22 | Case | s.ToLower () | Sql.Lower(s)
23 | Case | s.ToUpper () | Sql.Upper(s)
24 | Compare | s.CompareTo (a) | s > a ? 1 : s == 0 ? 0 : -1