Core Function UC

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
m (1 revision)
(Example)
 
Line 30: Line 30:
 
Println($value); // Prints testing
 
Println($value); // Prints testing
 
// Modify the string in place
 
// Modify the string in place
fixed ($p = $value)
+
my $n = StrLen($value);
 +
my $i = 0;
 +
while ($n-- > 0)
 
{
 
{
my $n = StrLen($value);
+
$value[$i] = UC($value[$i]);
my $i = 0;
+
$i++;
while ($n-- > 0)
+
{
+
$p[$i] = UC($p[$i]);
+
$i++;
+
}
+
 
}
 
}
 
// All done
 
// All done

Latest revision as of 09:57, 19 September 2015

UC( <expression> )

Contents

Description

The string to use.

Parameters

expression

The string to evaluate.

Return Value

Uppercase string.

Example

$result = UC("testing");
Println("Result:" , $result); // Prints TESTING

Modify the string in place

$value = "testing";
Println($value); // Prints testing
// Modify the string in place
my $n = StrLen($value);
my $i = 0;
while ($n-- > 0)
{
	$value[$i] = UC($value[$i]);
	$i++;
}
// All done
Println($value); // Prints TESTING
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox