How to use substring in IOS using Objective-C

To use substring in IOS using Objective-C you can use the snippet below.

Sample Objective-C

NSString *myString = @"http://codesnippets.fesslersoft.de";
NSString *myNewString = [myString substringFromIndex:7]; //myNewString will be "codesnippets.fesslersoft.de"

Please rate this snippet

How to uppercase the first letter of each word in C# and VB.NET

To uppercase the first letter of each word in C# and VB.NET you can use the following snippet.

Sample C#

public static string ToTitleCase(string input)
{
	return CultureInfo.CurrentCulture.TextInfo.ToTitleCase(input);
}

Sample VB.NET

Public Shared Function ToTitleCase(input As String) As String
	Return CultureInfo.CurrentCulture.TextInfo.ToTitleCase(input)
End Function

Please rate this snippet

How to get monday date of current week in MSSQL

To get the Monday date of the current week you can use the snippet below.

SELECT DATEADD(wk, DATEDIFF(wk,0,GETDATE()), 0) AS Monday

Please rate this snippet