Re: Use strings in Mathematica, like in C?
- To: mathgroup at smc.vnet.net
- Subject: [mg61398] Re: [mg61354] Use strings in Mathematica, like in C?
- From: Sseziwa Mukasa <mukasa at jeol.com>
- Date: Tue, 18 Oct 2005 02:44:41 -0400 (EDT)
- References: <200510160418.AAA22633@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
On Oct 16, 2005, at 12:18 AM, Renan wrote: > Hello, > > In the C programming language I can operate directly over the > characters of a string, like: > > int main() { > > char message[16] = "Hello!"; > message[n]='a'; > > /* ... other code ... */ > return(0); > > } > > This mean: Change the (n+1)th character (in C, array starts at 0) > to the > specified character. > > Q: How can I obtain similar effect in Mathematica? From the Help Browser: StringTake["string",{n}] gives the nth character in "string". Regards, Ssezi
- References:
- Use strings in Mathematica, like in C?
- From: Renan <renan.birck@gmail.com>
- Use strings in Mathematica, like in C?