Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[dotnet] add a length_str Op
  • Loading branch information
diakopter committed Nov 24, 2010
1 parent 91a2613 commit f443c7e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions dotnet/runtime/Runtime/Ops/Primitive.cs
Expand Up @@ -287,6 +287,17 @@ public static RakudoObject split_str(ThreadContext TC, RakudoObject x, RakudoObj
return list;
}

/// <summary>
/// Returns the length of the string.
/// </summary>
/// <param name="x"></param>
/// <param name="ResultType"></param>
/// <returns></returns>
public static RakudoObject length_str(ThreadContext TC, RakudoObject x)
{
return Ops.box_int(TC, Ops.unbox_str(TC, x).Length, TC.DefaultIntBoxType);
}

/// <summary>
/// Checks whether a character at a particular index in a string
/// is a member of a particular character class.
Expand Down

0 comments on commit f443c7e

Please sign in to comment.