I want to write a program to reverse a string.For example :string
stobereversed ="hello how are you"
becomes :"you are how hello". What is the fastest and most elegant code for
this?
nevermind i got it
"Jimmy" <be****@gmail.com> wrote in message
news:#s**************@TK2MSFTNGP10.phx.gbl...
Hi
I want to write a program to reverse a string.For example :string stobereversed ="hello how are you" becomes :"you are how hello". What is the fastest and most elegant code
for this?
I want to write a program to reverse a string.For example :string stobereversed ="hello how are you" becomes :"you are how hello". What is the fastest and most elegant code for this?
I don't know if it's the fastest and most elegant, but this will work:
string str = "hello how are you";
string [] ar = str.Split(' ');
Array.Reverse(ar);
string strR = string.Join(" ", ar);
--
Tom Porterfield
I get the following error:
Notice: Array to string conversion in C:\Documents and
Settings\ShepMode\Desktop\Websites\ShareMonkey.net\Web\join.php on line 11
in this code:
$input =...
Why string literals are regarded as char * not as const char *?
(1) void f(char *);
(2) void f(const char *);
f("foo") will call version (1) of function f.
I understand that the exact type...
Consider the following piece of code:
char *str = "Hello";
if (str = "Hello")
printf("\nstring matches\n");
str is pointer to char and "Hello" is a string literal whose
type is "array of...
How do I dynamically populate a string array?
I hope there is something obvious that I'm missing here
Option Strict On
dim s() as string
dim sTmp as string = "test"
dim i as integer
...
I have not been able to find a simple, straight forward Unicode to ASCII
string conversion function in VB.Net.
Is that because such a function does not exists or do I overlook it?
I found...
This is the code snippet that I've come up to convert a byte
to string. Is there a best practiced method for such a conversion?
- Jamie
public static string ByteArrayToString(byte array)
{...
Code which should allow my constructor to accept arguments:
<?php
class Person {
function __construct($name)
{
$this->name = $name;
}
function getName()
Hi
I'm maintaining a VisualC++ project to increase its security regarding
stored passwords.
I thought about using SHA256Managed to create a hash for the password
when creating a user and when...
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...