Skip to content

Conversation

@lvidacs
Copy link
Contributor

@lvidacs lvidacs commented Jun 15, 2015

JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com

@egavrin egavrin added this to the ECMA builtins milestone Jun 15, 2015
@egavrin egavrin added ecma builtins Related to ECMA built-in routines development Feature implementation labels Jun 15, 2015
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new_len + 1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add tests for trim, please.

Like from here:

var orig = '   foo  ';
console.log(orig.trim());

var orig = 'foo    ';
console.log(orig.trim()); // 'foo'

@lvidacs lvidacs force-pushed the string_prototype_trim branch from fa5b9a5 to 722faf8 Compare June 16, 2015 08:28
@lvidacs
Copy link
Contributor Author

lvidacs commented Jun 16, 2015

Thanks for the review, the patch is updated and tests are added.

@ILyoan ILyoan mentioned this pull request Jun 17, 2015
25 tasks
@galpeter galpeter mentioned this pull request Jun 17, 2015
29 tasks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK: we usually use the jrt-libc-include.h and not directly the ctype.h/other libc headers.

@lvidacs lvidacs force-pushed the string_prototype_trim branch from eddb47c to c4c0437 Compare June 22, 2015 14:27
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for this check as inside the ECMA_TRY_CATCH the ret_value is an empty value.

JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
@lvidacs lvidacs force-pushed the string_prototype_trim branch from c4c0437 to 2c93ffd Compare June 23, 2015 10:07
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

len - postfix - 1

@egavrin
Copy link
Contributor

egavrin commented Jun 23, 2015

Good to me after fixing.

JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
@lvidacs lvidacs force-pushed the string_prototype_trim branch from 2c93ffd to 58f49ca Compare June 23, 2015 10:39
@lvidacs
Copy link
Contributor Author

lvidacs commented Jun 23, 2015

Thanks for the reviews, the patch is updated.

@egavrin
Copy link
Contributor

egavrin commented Jun 23, 2015

if @galpeter is OK, make push

@galpeter
Copy link
Contributor

looks better, lgtm

@galpeter
Copy link
Contributor

Rebased & squased & merged: caa1617

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

development Feature implementation ecma builtins Related to ECMA built-in routines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants