Eric Gorr wrote:
Jochem Maas wrote:
Eric Gorr wrote:
Jochem Maas wrote:
> http://php.net/manual/en/function.stream-wrapper-register.php is as
close as it gets
I think. - total overkill for manipulating strings IMHO - (me thinks
there is atleast
one other in agreement) - there is a reason
[snip]
Well, as I mentioned before, you are welcome to look into the
surrounding useful examples for istringstream, etc. I can't think of a
single reason why similar reasons why istringstream, etc. is useful
would not apply to a php stream_wrapper for strings.
As for why things like istringstre
Jochem Maas wrote:
Eric Gorr wrote:
Jochem Maas wrote:
> http://php.net/manual/en/function.stream-wrapper-register.php is as
close as it gets
I think. - total overkill for manipulating strings IMHO - (me thinks
there is atleast
one other in agreement) - there is a reason php has all those b
Eric Gorr wrote:
Jochem Maas wrote:
> http://php.net/manual/en/function.stream-wrapper-register.php is as
close as it gets
I think. - total overkill for manipulating strings IMHO - (me thinks
there is atleast
one other in agreement) - there is a reason php has all those built in
string funct
But WHY WHY WHY would one want to treat a string as a stream, when PHP has
such good string handling functions?
THATS not been explained.
(Unless, knowing C and its limited string handling capabilities, one is
looking for a familiar hammer.)
It's Friday - time to go socialize - Miles
PS H
Jochem Maas wrote:
> http://php.net/manual/en/function.stream-wrapper-register.php is as
close as it gets
I think. - total overkill for manipulating strings IMHO - (me thinks
there is atleast
one other in agreement) - there is a reason php has all those built in
string functions :-)
And ther
Eric Gorr wrote:
This should be a fairly easy question for someone who already knows the
answer...
What I would like to be able to do is take a string and place it into a
'resource' so I can use functons like fscanf, fseek to process the string.
Is this possible? If so, how?
http://php.net
[snip]
Looks like it wouldn't be terribly difficult to get something like this
up and running.
I was just taking a look at:
http://us3.php.net/manual/en/function.stream-wrapper-register.php
I'm kinda surprised no one has written a wrapper for strings yet...
[/snip]
Perhaps because there is suc
Jay Blanchard wrote:
[snip]
Neither solution was particularly appealing which is why I asked the
question.
[/snip]
I see. Sorry I couldn't be more helpful. And I thought you wore looking
for a more precise function rather than the whole lot of things that can
be accomplished with isstringstrea
Eric Gorr wrote:
> Again, I would like to treat the string as a stream.
>
> One possible way to accomplish this would be to simply write the
> string to a temporary file, open the file with fopen and then use
> fscanf, fseek, etc. to process the text.
>
> However, I am assuming there is an easier w
[snip]
Neither solution was particularly appealing which is why I asked the
question.
[/snip]
I see. Sorry I couldn't be more helpful. And I thought you wore looking
for a more precise function rather than the whole lot of things that can
be accomplished with isstringstream.
--
PHP General Mail
Jay Blanchard wrote:
However, if I
know what you want to do with the string more specifically (I asked for
examples, which you have not given) I can get you to the right PHP
functions.
I am familiar with all of the PHP string functions.
PHP does not have a class or function similar to
isstri
[snip]
Jay Blanchard wrote:
> What, exactly, do you want to accomplish?
I want to be able to treat a string as a stream.
[/snip]
I know C++ and I know what you are talking about here. As I said before,
you would have pretty high overhead to do this in PHP. However, if I
know what you want to do
Jay Blanchard wrote:
What, exactly, do you want to accomplish?
I want to be able to treat a string as a stream.
For example, the C++ STL contains istringstream, which allows one to
treat strings as streams.
(http://www.cplusplus.com/ref/iostream/istringstream/)
If you are truly wondering w
[snip]
Again, I would like to treat the string as a stream.
One possible way to accomplish this would be to simply write the string
to a temporary file, open the file with fopen and then use fscanf,
fseek, etc. to process the text.
However, I am assuming there is an easier way (i.e. a method wi
Jay Blanchard wrote:
[snip]
Jay Blanchard wrote:
If you place the string into a variable then you would be able to work
with it that way.
Using what functions?
Part of the point was not to need to keep track of the current location
in the string, etc...basically things that streams tend to
[snip]
Jay Blanchard wrote:
> If you place the string into a variable then you would be able to work
> with it that way.
Using what functions?
Part of the point was not to need to keep track of the current location
in the string, etc...basically things that streams tend to handle well.
> There
Jay Blanchard wrote:
[snip]
What I would like to be able to do is take a string and place it into a
'resource' so I can use functons like fscanf, fseek to process the
string.
Is this possible? If so, how?
p.s. While I would be interested in possible alternative solutions, I
would like to kno
[snip]
What I would like to be able to do is take a string and place it into a
'resource' so I can use functons like fscanf, fseek to process the
string.
Is this possible? If so, how?
p.s. While I would be interested in possible alternative solutions, I
would like to know how to accomplish this
19 matches
Mail list logo