1 #Region "Microsoft.VisualBasic::b63b98204b941b66bd8cc91a2c5ec967, Microsoft.VisualBasic.Core\Language\Linq\Vectorization\Strings.vb"
2
3     ' Author:
4     
5     '       asuka (amethyst.asuka@gcmodeller.org)
6     '       xie (genetics@smrucc.org)
7     '       xieguigang (xie.guigang@live.com)
8     
9     ' Copyright (c) 2018 GPL3 Licensed
10     
11     
12     ' GNU GENERAL PUBLIC LICENSE (GPL3)
13     
14     
15     ' This program is free software: you can redistribute it and/or modify
16     ' it under the terms of the GNU General Public License as published by
17     ' the Free Software Foundation, either version 3 of the License, or
18     ' (at your option) any later version.
19     
20     ' This program is distributed in the hope that it will be useful,
21     ' but WITHOUT ANY WARRANTY; without even the implied warranty of
22     ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23     ' GNU General Public License for more details.
24     
25     ' You should have received a copy of the GNU General Public License
26     ' along with this program. If not, see <http://www.gnu.org/licenses/>.
27
28
29
30     ' /********************************************************************************/
31
32     ' Summaries:
33
34     '     Class Strings
35     
36     '         Constructor: (+1 OverloadsSub New
37     '         Function: Len
38     
39     
40     ' /********************************************************************************/
41
42 #End Region
43
44 Imports Base = Microsoft.VisualBasic.Strings
45
46 Namespace Language.Vectorization
47
48     ''' <summary>
49     ''' The <see cref="String"/> module contains procedures used to perform string operations.
50     ''' </summary>
51     Public NotInheritable Class Strings
52
53         Private Sub New()
54         End Sub
55
56         ''' <summary>
57         ''' Returns an integer containing either the number of characters in a string or 
58         ''' the nominal number of bytes required to store a variable.
59         ''' </summary>
60         ''' <param name="strings">
61         ''' Any valid String expression or variable name. If Expression is of type Object
62         ''' the Len function returns the size as it will be written to the file by the 
63         ''' FilePut function.
64         ''' </param>
65         ''' <returns>
66         ''' Returns an integer containing either the number of characters in a string or 
67         ''' the nominal number of bytes required to store a variable.
68         ''' </returns>
69         Public Shared Function Len(strings As IEnumerable(Of String)) As IEnumerable(Of Integer)
70             Return strings.Select(AddressOf Base.Len)
71         End Function
72     End Class
73 End Namespace