|
-
Nov 14th, 2000, 06:59 PM
#1
Thread Starter
Lively Member
-
Nov 14th, 2000, 08:00 PM
#2
_______
<?>
: "." and "," and "?" and "'" and "-".
a text field is it a file and if so give a few lines
from the file and if it is comma delimited or not.
the special characters...does it mean you don't count those as an ending..example jack ate melon. means you want to leave the . and end up with this kjacay eatay nmeloay.
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Nov 14th, 2000, 08:05 PM
#3
Thread Starter
Lively Member
ok here it is
the way this thing works is that i input from a text file like this:
To be or not to be, -that is the question : -Whether 'tis nobler in the mind to suffer the slings and arrows of outrageous fortune... and so on
what i have to do is find issolate every word and move the first letter of that word to the end and add "ay" to the end of the same word. So it looks like this:
Hello Sir.
elloHay irSay. Pig Latin
how do i do this, please help
-
Nov 14th, 2000, 08:34 PM
#4
_______
<?>
Here is a start..this will seperate the words.
[code]
Option Explicit
Public Function Split2(ByVal sString As String, ByVal sSeparator As String) As Variant
Dim sParts() As String
Dim lParts As Long
Dim lPos As Long
lPos = InStr(sString, sSeparator)
While lPos
ReDim Preserve sParts(lParts)
sParts(lParts) = Left(sString, lPos - 1)
sString = Mid(sString, lPos + Len(sSeparator))
lPos = InStr(sString, sSeparator)
lParts = lParts + 1
Wend
If Len(sString) Then
ReDim Preserve sParts(lParts)
sParts(lParts) = sString
End If
Split2 = IIf(lParts, sParts, Array())
End Function
Private Sub Command1_Click()
Dim sMyFile As String
Dim intNum As Integer
'open for binary and read it into a string
sMyFile = "C:\My Documents\MyFile.txt"
intNum = FreeFile
Open sMyFile For Binary As intNum
myString = Space(LOF(intNum))
Get #intNum, , myString
Close intNum
Dim vLines As Variant
Dim lLine As Long
Dim sLet As String
vLines = Split2(myString, " ")
For lLine = 0 To UBound(vLines)
List1.AddItem vLines(lLine)
Next
End Sub
[code]
[Edited by HeSaidJoe on 11-14-2000 at 08:46 PM]
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|