home > 比較編 > C, C++, Objective-C, Java, C# > strings >

ForNext

Only Do What Only You Can Do

040. string to number

VBScript

JScript

Perl

PHP

Python

Ruby

PowerShell

Scala

F#

C

C++

#include <sstream>
stringstream ss("7 14.3 12");
int i;
double d;
long l;
ss >> i >> d >> l;

C++Builder

VC++

C#

byte.Parse("14")
short.Parse("14")
int.Parse("14")
long.Parse("14")
float.Parse("14")
double.Parse("14")
decimal.Parse("14")

Java

Byte.parseByte("14")
Short.parseShort("14")
Integer.parseInt("14")
Long.parseLong("14")
Float.parseFloat("14.7")
Double.parseDouble("14.7")

Objective-C

[@"14" integerValue]
[@"14" longLongvalue]
[@"14.7" floatValue]
[@"14.7" doubleValue]



D

VB

VB.NET

Delphi

Ada

PL/SQL

T-SQL

関数型

inserted by FC2 system