If my extrasensory perception works the best, You want to replace an empty space before the words that the space lenght is equal to the word.
For example:
I am a developer. ==> I am a developer
Then:
public string MakeSpace(string text)
{
StringBuilder sentenceBuilder = new StringBuilder();
string[] strings = text.Split((char)32);
foreach (string s in strings)
{
if (string.IsNullOrEmpty(s))
continue;
StringBuilder spaceBuilder = new StringBuilder();
for (int i = 0; i < s.Length; i++)
{
spaceBuilder.Append(" ");
}
sentenceBuilder.Append(string.Format("{0}{1}", spaceBuilder.ToString(), s));
}
return sentenceBuilder.ToString();
}
Public Function MakeSpace(text As String) As String
Dim sentenceBuilder As New StringBuilder()
Dim strings As String() = text.Split(CChar(32))
For Each s As String In strings
If String.IsNullOrEmpty(s) Then
Continue For
End If
Dim spaceBuilder As New StringBuilder()
For i As Integer = 0 To s.Length - 1
spaceBuilder.Append(" ")
Next
sentenceBuilder.Append(String.Format("{0}{1}", spaceBuilder.ToString(), s))
Next
Return sentenceBuilder.ToString()
End Function